suspend-react
suspend-react copied to clipboard
Add ability to create a local cache instance
We're generating a lot of cache keys in our app, and would like to clear all keys under a specific "namespace".
- 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.
- My other suggestion is to create a cache specific to each use-case in the app, and a
clearfunction 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 :)
Sorry. I updated the description now!