Cache warming & CDN caching glossary
Cache warming is requesting your pages through the CDN right after a purge or deploy, so the first visitors get a cached copy instead of a trip to your origin. Doing it well depends on the details below: the Cache-Control directives that decide what a CDN may store, how purges empty it, and the metrics a cold cache moves. Start with what cache warming is, or read why it matters after a purge.
Every entry cites the RFC or the CDN documentation it is based on. More articles are on the blog.
HTTP caching headers
Cache-Control
Cache-Control is the HTTP header that tells browsers and CDNs whether a response may be stored, for how long, and when it must be revalidated.
max-age
max-age sets how many seconds a response stays fresh after the origin generated it. Every cache, private or shared, may reuse it until then.
s-maxage
s-maxage sets the freshness lifetime for shared caches such as CDNs only. It overrides max-age and Expires there, and browsers ignore it.
no-cache
no-cache lets a cache store a response but requires it to revalidate with the origin before every reuse. It does not mean do not cache.
no-store
no-store tells every cache, browser or CDN, not to store any part of the request or the response. Each request then goes to the origin.
public and private
private lets only the browser cache a response. public lets shared caches such as a CDN store it, even for requests that carry Authorization.
stale-while-revalidate
stale-while-revalidate lets a cache serve a stale response for a set number of seconds while it fetches a fresh copy in the background.
stale-if-error
stale-if-error lets a cache serve a stale response for a set number of seconds when the origin errors or cannot be reached.
must-revalidate
must-revalidate forbids a cache from serving a stale response without checking the origin first. If the origin is down, the cache returns an error.
immutable
immutable tells clients a response will not change while it is fresh, so they skip revalidation, even on reload. Use it for fingerprinted assets.
Expires
Expires gives a date after which a response is stale. It predates Cache-Control, and caches ignore it whenever max-age or s-maxage is present.
ETag
An ETag is a validator: an opaque tag the origin assigns to one version of a response, so caches can revalidate it with If-None-Match.
Last-Modified
Last-Modified gives the date a resource last changed. Caches send it back in If-Modified-Since to revalidate, and use it for heuristic freshness.
Vary
Vary lists the request headers that changed the response. Caches store one variant per value, so a broad Vary splits the cache and lowers hits.
Age
Age is the number of seconds since the origin generated or revalidated a response. A cache sets it; 0 or no Age usually means it came from origin.
CDN-Cache-Control
CDN-Cache-Control is a targeted header, defined in RFC 9213, that sets caching rules for CDNs only and overrides Cache-Control there.
Cache-Status
Cache-Status, defined in RFC 9211, is a standard response header in which each cache on the path reports whether it served a hit and why.
CDN concepts
PoP (point of presence)
A PoP is a CDN data center that terminates visitor connections and holds its own cache. A page cached in one PoP is not cached in the others.
Origin server
The origin server is where your site is actually generated or stored. A CDN fetches from it on a miss and serves cached copies otherwise.
Cache key
A cache key is the identifier a cache files a response under, usually the method and URL plus selected headers, cookies or query parameters.
TTL (time to live)
TTL, or time to live, is how long a cache keeps a response fresh before it must revalidate or refetch it. In HTTP it comes from max-age or s-maxage.
Cache hit and miss
A hit is a request answered from cache. A miss is one the cache had to forward to the origin because it had no usable stored copy.
Cache hit ratio
The cache hit ratio is the share of requests a CDN serves from cache. Purges, short TTLs and broad cache keys or Vary headers all lower it.
Tiered caching
Tiered caching puts upper-tier caches between edge PoPs and the origin, so a miss at the edge asks an upper tier before the origin.
Request collapsing
Request collapsing merges concurrent misses for the same object into one origin request, so a cold cache does not send a crowd to your origin.
Purging & invalidation
Cache invalidation (purge)
Cache invalidation, or purging, removes or marks stale cached copies before their TTL ends, so the CDN fetches the new version from the origin.
Surrogate keys (cache tags)
Surrogate keys, or cache tags, are labels a response carries so you can purge every cached object with that label at once instead of by URL.
Cold cache
A cold cache has no stored copy of the pages being requested, so every request is a miss that goes to the origin until the cache fills again.
Cache warming
Cache warming is requesting your pages through the CDN right after a purge or deploy, so the first visitors get a cached copy, not an origin trip.
Performance & SEO
TTFB (time to first byte)
TTFB is the time from starting navigation to the first byte of the response. A cache miss adds the origin round trip to it. About 0.8 s or less is good.
LCP (Largest Contentful Paint)
LCP is the time until the largest image or text block in the viewport renders. It is a Core Web Vital, good at 2.5 s or less at the 75th percentile.
Core Web Vitals
Core Web Vitals are Google's metrics for loading (LCP), responsiveness (INP) and visual stability (CLS), measured from real Chrome users.
Crawl budget
Crawl budget is how many URLs Googlebot can and wants to crawl on a site. Fast, error-free responses raise the crawl capacity limit.
XML sitemap
An XML sitemap lists the URLs of a site, with optional lastmod dates, so crawlers can find them. It is also a ready-made list of pages to warm.
Warm your cache after every deploy
sitewarm requests the pages in your sitemap after a deploy and reports the cache state the CDN returns for each one, with the vantage point it was measured from.