About
A cache store is an http cache component that caches the http response if the cache control header permits it.
Type
There is two type of cache:
- client cache (user-agent cache (ie browser cache)
Key
The cache key is the identifier used to retrieve the resource in the cache store.
This is a grey area as browser/proxy may implements different logic but the following value are for sure part of the cache key:
- the origin url
- the request method
With the Vary response header, you can specify additional request headers to go into the cache key. (Not all proxy, browsers implements it)
Url
The resource url was used as URL value but due to security concern, the URL key value used tends to be:
- the top-level site / frame (https://a.example)
- the current-frame site (https://a.example),
- the resource URL https://x.example/doge.png
Note: When the resource requested is from the top-level -frame:
- the top-level site
- the current-frame site
are the same.
For example, a user navigate to
- the origin: https://a.example
- with an image hosted in an iframe from https://c.example.
- that has the resource url: https://x.example/doge.png.
the url cache key value consists then of:
- the top-level site: https://a.example,
- the current-frame site: https://c.example
- and the resource URL: https://x.example/doge.png.