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
| Name | Type | Description |
|---|---|---|
| directives | comma-separated cache directives | Select request or response directives appropriate to the message, such as no-cache, no-store, private, max-age or s-maxage. |
| directive_value | token or quoted string as specified for the directive | Some 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