Guide
APIs & integration
HTTP caching for APIs and websites
How Cache-Control, ETags and CDNs reduce latency — and how a wrong cache makes users see each other's data.
Caching is a correctness problem first
A cache that serves yesterday’s public blog post is a win. A cache that serves Alice’s invoice to Bob is an incident. Start by marking responses public or private.
The headers that matter
Cache-Control: public, max-age=…for truly public, identical-for-everyone bytes.privatefor per-user HTML or JSON.no-storefor anything with tokens, secrets or personal data.ETag/If-None-Matchfor cheap revalidation.
APIs
Most authenticated JSON should be private or no-store. Public GETs of reference data (country lists, public docs) can be cached aggressively. See REST.
Related
Last verified: August 2026. Technology and pricing change — always confirm current details with the vendor.