feature request: cache override/force
See original GitHub issueIt’d be useful to have an option on making a request to clear the existing cache for the id. This is because knowing the id of a request to invalidate it can be difficult.
The workaround I might use for now is to use the built in id generator and calculate the expected id from it, but it adds a lot of complexity.
I see this being implemented as:
- calculate
id
using the key generator - calling
await axios.storage.remove(id)
- running the request
Issue Analytics
- State:
- Created a year ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Request.cache - Web APIs | MDN
It controls how the request will interact with the browser's HTTP cache. Value. A RequestCache value. The available values are: default — The ......
Read more >requests-cache 0.9.7 documentation
requests -cache is a transparent, persistent cache that provides an easy way to get better performance with the python requests library.
Read more >A Caching Structure! - NI Community - National Instruments
I propose an simple Caching Structure as show on the right that retains that same functionality with less baggage.
Read more >Feature request: Client Caching · Issue #861 · RicoSuter/NSwag
It will be super cool to have a client caching which is created based on some sort of attribute in the web api...
Read more >Cache | Elf | A Reactive Store with Magical Powers
npm i @ngneat/elf-requests. To use this feature, provide the withRequestsCache props factory function in the createStore call: todos.repository.ts.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey @domdomegg, I’ve just released 0.10.5!
Hey @arthurfiorette, the
override
option you’ve implemented exactly what I wanted I think - thanks 🙌I agree that centralizing all request functions might go some way to alleviating this problem. However, in our app doing that would add quite a bit of boilerplate to an app that already strictly types its APIs using some existing wrappers. And yes, those wrappers could also generate unique ids for each endpoint and make sure it’s applying them correctly when calling with different arguments/params etc. (I think the same might go for a file which externalizes and centralizes the right ids dependent on params etc.), but at least in our codebase that would be significantly more complex than being able to override the cache when making certain requests we know shouldn’t use the cache anyways.
Again, thanks for the amazingly fast response - this feature really helps us 😃