arthurfiorette / axios-cache-interceptor

📬 Small and efficient cache interceptor for axios. Etag, Cache-Control, TTL, HTTP headers and more!

Home Page:https://axios-cache-interceptor.js.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

requests deduplication not working

inikonorov opened this issue · comments

hello! is requests deduplication supporting now? I try to send request in React hook which one is used in 4 components and I see all 4 requests in network

Yes it should be working... USe debug logs to understand why it is not caching.

If I will attach debug logs, will you explain me what's happening?

Request is executed from hook in 2 different components on one page

image
image

Your responses are coming with explicitly headers saying to not cache the response, as its saying on Cache header interpreted as 'dont cache'. You can override this behavior with interpretHeader: false.