HTTP caching
Also called: HTTP cache, Cache-Control, freshness
An HTTP cache stores responses and reuses them when protocol rules permit. Private caches usually serve one user; shared caches serve multiple clients. Freshness, validators and request matching decide whether a stored response can be reused, checked with the origin, or replaced.
A hypothetical public glossary response with Cache-Control: max-age=60 can remain fresh for sixty seconds of age, subject to other rules. After freshness expires, a validator may avoid downloading the whole article again. The directive no-cache requires validation before reuse; no-store directs caches not to store the response. Those names have different meanings.
- Read first
- HTTP headers
- Further reading
- IETF RFC 9111 — HTTP Caching