Re: [w3c/ServiceWorker] Allow caches to opt-in to granular cleanup (#863)

Some thoughts as well:

- IMO it's not great that when responding to a single request, developers wanting to do any sort of expiration need to check both the Cache API and IDB. Having data for the same request stored in multiple places makes it much easier for that data to get out of sync (e.g. the cache gets cleared but IDB doesn't, or vise-versa), and then we need extra logic to handle those sorts of cases.

- In addition to cache expiration, there are other use cases for making Request/Response objects structured cloneable and easily storable in IDB. Right now we have to do [a fair amount of work](https://github.com/GoogleChrome/workbox/blob/2ffe76d/packages/workbox-background-sync/models/StorableRequest.mjs) to extract all the data from a request (including reading the body as a Blob) so it can be stored in IDB and retried during a `sync` event.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/ServiceWorker/issues/863#issuecomment-433970590

Received on Monday, 29 October 2018 16:13:45 UTC