Skip to content

Conversation

@lindskogen
Copy link

@lindskogen lindskogen commented Oct 18, 2022

We're generating a lot of cache keys in our app, and would like to clear all keys under a specific "namespace".

  1. My first idea was to add the ability to clear keys by prefix, but searching through all the keys seems like a bad idea for perf.
  2. My other suggestion is to create a cache specific to each use-case in the app, and a clear function to delete the whole list in that namespace.

This seemed like more in-line with the direction the React team are taking with scoped cache.

We're already using this solution in our production app with great results :)

Copy link
Member

@joshuaellis joshuaellis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR, i'm gonna be honest here, you really haven't put any information as to the problem you're trying to solve, why this solves the issue, why you think we should resolve the issue. So if you can edit your description to be a thorough PR description this can be considered.

If you need some help take a look at this: https://github.blog/2015-01-21-how-to-write-the-perfect-pull-request/#approach-to-writing-a-pull-request

@lindskogen
Copy link
Author

Sorry. I updated the description now!

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

Successfully merging this pull request may close these issues.

2 participants