Directive family cache
implements the
HTTP Cache-Control.
Sets the value of the Cache-Control
header
for successful responses
to safe HTTP methods.
/:
GET:
cache:control: max-age=60000
In terms of security, the following implicit modifications are made to the cache-control
header:
- If it contains the
public
directive withoutno-cache
and the request is authenticated, theno-cache
directive is added. This is done to prevent the storage of authentication tokens in shared caches. - If it does not contain the
private
directive and the request is authenticated, theprivate
directive is added. This is to prevent the storage of private data in shared caches. - If it contains
private
directive and the request is authenticated, thenvary: authorization
is added. This is to prevent the reuse of private data when authenticated as another identity.1
Same as cache:control
without implicit modifications.
/:
GET:
cache:exact: public, max-age=60000
- HTTP 14.9.1 What is cacheable
- See also features
Footnotes
-
This also will invalidate the cache each time a new token is used for the same identity, thus limiting the
max-age
value to the token'srefresh
time. See Issuing tokens. ↩