core
core copied to clipboard
`Fetch`: Integration with the Cache API
@billiegoose:
I'm not actually working on this yet (I'm still using IndexedDB in the Service Worker), but I think it would be cool so I'll write this idea down anyway.
It's still experimental, but the Cache API is very cool:
- it's a key / value store
- for arbitrary files (no need to serialize/deserialize)
- supports streaming
- no fixed size limits (limits are determined by the quota API which is still in development)
cachesglobal available in both Window and Service Worker scopes- supports quickly downloading and caching a batch of files for offline access via
Cache.addAll()
@jvilk:
Sounds nice. I would call it
CacheStorageFSinstead, since I would like to have some sort of generic caching file system implemented in the future (https://github.com/jvilk/BrowserFS/issues/95).
https://github.com/jvilk/BrowserFS/issues/191
Looking into the Cache API, it can only cache Requests/Responses. That means it is limited to fetch requests.