Name
Cache-Control
Synopsis
Cache-Control:
directives
Description
Specifies caching directives in a comma-separated list.
Cache request directives
-
no-cache2n Do not cache.
-
no-store Remove information promptly after forwarding.
-
max-age =seconds Do not send responses older than seconds.
-
max-stale [ =seconds ] Send expired data. If seconds are specified, only send data expired by less than the specified number of seconds.
-
min-fresh= seconds Send data only if still fresh after the specified number of seconds.
-
only-if-cached Do not retrieve new data. Only return data already in the cache. Useful unless the network connection is down.
Cache response directives
-
public Cachable by any cache.
-
private Not cachable by a shared cache.
-
no-cache Do not cache.
-
no-store Remove information promptly after forwarding.
-
no-transform Do not convert data.
-
must-revalidate Client must revalidate the data.
-
proxy-revalidate Client must revalidate data except for private client caches.
-
max-age=seconds The document should be considered stale in the specified number of seconds.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access