Browser's Cache API as backing storage? #668
-
Thanks for creating this library. I have yet to try it, but it looks promising. I'm trying to cache a few large, binary files (~100MB each) and noticed the browser's builtin resource caching mechanisms refuse to cache these large files, even if I set I'm unsure whether the So, I was wondering whether there is a Cache API based storage backend out there. If not, could you give some pointers with regards to implementing one? Any reasons why the Cache API may not be suitable as storage backend? One challenge I see is that the library specific metadata (part of |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Hey @martijnthe. Regarding Cache API, it only stores We are working on shipping a idexed db storage (#669). However, I do not think caching files over 100mb would be a good thing to be done manually by any library. The browser built-in cache should be done. I also do not think If you need more help, you could paste here the request/response headers. Also make sure to debug this with |
Beta Was this translation helpful? Give feedback.
Hey @martijnthe.
Regarding Cache API, it only stores
Request
/Response
objects which isn't what axios uses, (altough it has a request.request property with it). We cannot convert both of them interchangeably with axios, so I don't think this would ever get implemented. Also its use case is more focused on when you cannot express your cache mechanism over cache-control/related headers and need to reject cache by default and enable them manually through javascript, as you can see in this MDN example...We are working on shipping a idexed db storage (#669). However, I do not think caching files over 100mb would be a good thing to be done manually by any library. The browser built-in cache sho…