-
Notifications
You must be signed in to change notification settings - Fork 152
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
High performance/availability cache setup - feature request #62
Comments
Are you saying you need methods like |
Something like that, for a given key. It will be needed for this feature I can add it to memory cache, as well as redis cache, but for other caches it may cause the feature to not work because this method wont be available. Any idea for this? |
I suppose this could just be added like it is in /**
* Binds to the underlying store's `ttl` function if it exists.
* @function
* @name ttl
*/
if (typeof self.store.ttl === 'function') {
self.ttl = self.store.ttl.bind(self.store);
} Your new feature should probably check if the |
Thanks for your answer, I will assume that |
I think this sounds good. This should probably be something a user enables via config. Something like |
Ok, will go for a config var then, thanks for your inputs! |
@PuKoren I was looking to do something almost exactly the same (in fact your solution sounds better than what I was thinking). Did you end up creating something for this? |
Hello!
I'm currently adding a new feature to node-cache-manager. However I am not sure of the way to go yet, because I can't find a consistent API for the available stores.
The idea of the feature request is to add an always available, low latency multi store setup. This way even if our frontend server loses connection to backend for whatever reason, it will keep working at maximum speed for our front users.
Idea for the high perf/high availability setup using node-cache-manager:
However, since API of stores is not defined, I can't have access to TTL, expired date/time of keys, etc. and of course I don't want to call
.get
on each store every time wrap is called, to check if it contains the key in order to update it.Any idea on how to implement this in an efficient manner?
Feature specs available here: dial-once@9948303
The text was updated successfully, but these errors were encountered: