Closed mlegait closed 1 year ago
Hey @mlegait
The cache is for the session and not persistent between reloads. You could set a rule in a service worker to add them to the Cache Storage, but this is beyond the scope of this library.
Yes, sorry for the trouble. I misunderstood the behavior π Thank you for this library π
Describe the bug I'm not able to have the cache working. Even if the same URL is targeted, the same icon is downloaded again and again.
To Reproduce
Here is a piece of my component:
So I've set
cacheRequests
to true. Confirmed in the Components tab of React DevTools:But here is what I can see in the network tab of Chrome DevTools: And here is what I can see in the console: So
hasCache
is false.Expected behavior Each icon should be downloaded only once and cached so that they're not downloaded again.
Maybe it's just me not understanding how it's supposed to work. In that case, could you explain it to me? How can I check what's in the
cacheStore
you're talking about in the README? Thank you very much for your help πRun
npx envinfo --system --binaries