You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been using this module with great success in an express app. The middleware functionality does just about everything I need it to, except for two things which I will list below.
First, the ability to clear the cache based off a key would be awesome. I was able to make a quick hack to accomplish this before creating the middleware by the following (Basicly this just sets the TTL to 0):
Next, there are situations where the cache results would be different depending on what user session is signed in. The ability to have the key generate based off a user session, or any additional key options on the middleware would be awesome.
I have been using this module with great success in an express app. The middleware functionality does just about everything I need it to, except for two things which I will list below.
First, the ability to clear the cache based off a key would be awesome. I was able to make a quick hack to accomplish this before creating the middleware by the following (Basicly this just sets the TTL to 0):
Next, there are situations where the cache results would be different depending on what user session is signed in. The ability to have the key generate based off a user session, or any additional key options on the middleware would be awesome.
My idea on this would be to allow a key object handler as an option on
https://github.com/kelsin/stale-multi-cache/blob/master/src/cache.js#L193
And every time getKey is called at
https://github.com/kelsin/stale-multi-cache/blob/master/src/cache.js#L209
It will check to see if handler exists, execute handler, or stick with the default.
The text was updated successfully, but these errors were encountered: