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 remove method to cache (result of createCache method) #202

Open
szogun1987 opened this issue Apr 11, 2022 · 1 comment
Open

Add remove method to cache (result of createCache method) #202

szogun1987 opened this issue Apr 11, 2022 · 1 comment

Comments

@szogun1987
Copy link
Contributor

Is your feature request related to a problem? Please describe.
In some cases I would like to mark cache entry as "to reload in next use" so pretty much remove entry.

Describe the solution you'd like
Internal cache's lru already has delete method, please just expose it.

Describe alternatives you've considered
I've considered creating separate cache instance and keep it in component's state but, as this cache is used by multiple components it would be quite complex solution.
Currently I write artificial value into a cache, and detect it when call useCache.

Additional context
None

@jared-paperspace
Copy link

this seems reasonable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants