Skip to content
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

Add a method to clear entire cache except a few keys #31

Open
cheap-glitch opened this issue Jul 19, 2022 · 1 comment
Open

Add a method to clear entire cache except a few keys #31

cheap-glitch opened this issue Jul 19, 2022 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@cheap-glitch
Copy link
Collaborator

It could be named something like cache.clearExcept, and would accept an array of keys to preserve.

This would allow resetting the cache easily while keeping some important data, e.g. login credentials.

@fregante
Copy link
Owner

fregante commented Aug 6, 2022

There's actually an internal method that does this and it's being called by clear. Basically we just need to use export const clear = deleteWithLogic and it will work right away. PR welcome

@fregante fregante added enhancement New feature or request help wanted Extra attention is needed labels Aug 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants