axios-hooks
axios-hooks copied to clipboard
Feature Request: Clearing specific cache key
When using lru cache, it looks like the config object is stringified for the key.
https://github.com/simoneb/axios-hooks/blob/6f060a20db7cb4ca70bd06315e05ff0a847ebd4d/src/index.js#L48
In my project i have a need to clear the cached value so that i can fetch new items. At the moment the way we're doing this is by purging the entire cache.
Would it be possible to either:
- Add a config option for custom cache key, which we can reference easily.
- Return a method just like the cancel method, which would clear only the cache key?