Re: [whatwg/fetch] Define the "Preload Cache" (#590)

> It seemed kinda preferable to me if all these mechanisms would end up in the same cache. I think at least that in Firefox that's what we're planning to use for `rel=preload`.

I think separation is better.  

In Gecko, there is a concept of resource memory cache, which each resource loader implements on its own (= Memory Cache).  There is also a concept of sharing e.g. stylesheets among documents, this is also part of this Memory Cache concept.  This is independent of preloads.

Then, each DOM document instance keeps a strong map of preloads that consuming tags can look for and consume (and remove from the map).  In reality, a preload creates an entry in the Memory Cache (in resource loaders), because preload in Gecko is nothing else than a speculative load with just a flag for higher priority.  The map in the document (= Preload Cache) is there to have a central spot to look at when `<link rel=preload>` HTML tag is added to the tree to be source of event notifications and also simplifies few other things regarding implementation, e.g. for fetch and font types, and few other details.


-- 
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/590#issuecomment-648934087

Received on Wednesday, 24 June 2020 16:43:03 UTC