Re: [whatwg/fetch] Double-keyed HTTP cache (#904)

> My current thinking is that for caches we want something analogous to https://fetch.spec.whatwg.org/#connections with a way to obtain a cache given some keying material.

+1 to this. It seems that, from an infrastructure perspective, declaring that the client has multiple caches, similar to how we do for connection pools (which would presumably be extended in #917), would work.

That is, a given request has an associated `HTTP cache` derived from the primary key(s) (e.g. the top-frame origin or the top-frame-origin+initiator). When performing an [http-network-or-cache-fetch](https://fetch.spec.whatwg.org/#http-network-or-cache-fetch), the cache object for the request is used to fetch the request URL.

This would allow the rest of the infrastructure to naturally work, by conceptually stating there are multiple caches (similar to how Service Workers do with the Cache object). An implementation would be able to implement this using a single logical disk store by double-keying/triple-keying, which should be indistinguishable from the spec.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/904#issuecomment-535382463

Received on Thursday, 26 September 2019 07:45:13 UTC