HTTP headers

Cache-Control header

Communicates response cache policy. Use no-cache for validation, no-store for sensitive data, and explicit freshness for public assets.

Formal Syntax & Structure

nginx syntaxnginx
Cache-Control: directive[, directive...]

Parameters & Attributes

NameTypeDescription
directivescomma-separated cache directivesSelect request or response directives appropriate to the message, such as no-cache, no-store, private, max-age or s-maxage.
directive_valuetoken or quoted string as specified for the directiveSome directives require values, others take none; freshness seconds are nonnegative integers. No-store is not a complete privacy guarantee.

Working Example

Example Snippetnginx
Cache-Control: no-cache
Nginx Reference