-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ttl option is ignored when constructed with an external redis instance #14
Comments
Even if i set the TTL to 10 it does not expire. I had to set it like below to make it work.
|
We're seeing the same issue. As a workaround, we were able to set a default cache value like this for cluster mode: var redisCache = cacheManager.caching({
store: redisStore,
clusterConfig: {
… (various config settings) …
options: {
ttl: 600
}
}
}); For non-cluster mode you'd add an But ultimately I hope this gets fixed. We would prefer to set the TTL at the top level so it remains compatible with other cache stores. |
Did a rewrite of this package with top level ttl used by external Redis instance here: https://www.npmjs.com/package/@tirke/node-cache-manager-ioredis |
Example
Source
Output (Actual)
Output (Expected)
The text was updated successfully, but these errors were encountered: