services/network/pervasive_resources/README.md
This directory contains the core of the logic for determining if a request is for a pervasive resource as part of the implementation for cache sharing for extremely-pervasive resources.
For a select list of resources that have been determined to be safe and in extremely-wide use, Chrome can choose to store them in a single-keyed HTTP cache.
The list of URLPatterns for pervasive resources is generated by analyzing the HTTP archive for resources with the following criteria:
cache-control: public and did not have a set-cookie response header.script and style destinations as well as and compression dictionaries.The full list must not exceed 500 entries.
In order to protect the user from privacy and security risks, the single-keyed cache can only be used when all of the following conditions are met for a request:
script, style or compression-dictionary.VALIDATE_CACHE, BYPASS_CACHE, SKIP_CACHE_VALIDATION, DISABLE_CACHE, or ONLY_FROM_CACHE load flags.cache-control: public.For the last requirement, the cache isolation key has already been selected by the time the response headers are available so, in that case, the response will not be written to cache.
For all other requirements, the conditions can be checked at the time that the request is made and when a cache isolation key is generated.
For requests that do not meet the criteria, they fall through to using the normal triple-keyed HTTP cache.
The list of URLPatterns includes an expiration date for when the list is no longer considered "fresh" and should be ignored.