Closed ablewalmsley closed 4 years ago
Hi @ablewalmsley, I am not sure I follow what is the issue. Could you write a small example ? Cheers!
@sebelga db, and stores get passed in, but hashCacheKeys does not. This is because config end up as undefined on line 69 of your current code.
new NsqlCache({ db, hashCacheKeys: false, stores: [ { store: redisStore, host: process.env.REDIS_HOST, auth_pass: process.env.REDIS_PASSWORD } ] })
The hasCacheKeys
needs to be inside the config
object. Have you tried this?
new NsqlCache({
db,
config: {
hashCacheKeys: false
},
stores: [
{ store: redisStore, host: process.env.REDIS_HOST, auth_pass: process.env.REDIS_PASSWORD }
]
})
whoops, haha, my mistake, thanks for clearing it up!
custom settings for certain variables (i.e. hashCacheKeys) are not used, as config ends up undefined before overwriting default options.
workaround for #7