Protocols
Saved & recent

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
Related
Conditional requests, Content negotiation, Web proxy
Further reading
IETF RFC 9111 — HTTP Caching
public response · age fresh stale 0 s 20 s 60 s 80 s served from cache later request revalidate stale response cache origin no-cache no-store revalidate before reuse do not store
A hypothetical cacheable response is fresh until age 60 seconds. A request at age 20 reuses it; a later request revalidates in this example. Freshness expiry is not an eviction deadline. No-cache and no-store have different rules.

View in the full Protocols collection