-
Notifications
You must be signed in to change notification settings - Fork 86
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
How to clear cache? #46
Comments
I used this const someStore = new Map
function test(keys) { }
memoize(test, {
cache: {
create() {
const store = someStore
return {
has(key) {
return store.has(key)
},
get(key) {
return store.get(key)
},
set(key, value) {
store.set(key, value)
}
}
}
}
})
someStore.clear() |
Should this issue be closed? Or are there more details on how/when you'd want to clear the cache? I don't see any options for putting timers on the cache to age out entries so maybe that's an idea for this issue. If I were to do that I'd probably just write a custom cache where the |
If you set the cache like here #16 (comment) then you can use keyv's |
No description provided.
The text was updated successfully, but these errors were encountered: