lisaogren / axios-cache-adapter

Caching adapter for axios. Store request results in a configurable store to prevent unneeded network requests.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Any plans on ETag support?

igorsantos07 opened this issue · comments

I'm looking for a simple way to support caching my own API's requests, but it seems Axios doesn't care to implement the full HTTP layer including caching.

Then, I found this lonely library, but it seems there's no support for all the caching headers - namely, I didn't find ETag mentions in the documentation. I wonder if there's anything hidden, or plans to support optimistic caching? I mean, re-doing requests based on TTL is not the best solution if you can use HTTP 302 to make sure you've got the newest information instead of downloading the entire payload again "just because time's up".

Not exactly a critique, but this all got me curious on why there's a couple of custom caching for JS HTTP clients, but almost no one implements the HTTP caching fully - checked SuperAgent too, there's support on a... 10-star plugin.

I went through the same problem. So i created another package to solve this and others things.
If someone else has also stopped here to resolve this, take a look: https://github.com/ArthurFiorette/axios-cache-interceptor

In here i explain better why i created another package.