Why cache warming matters after a purge
· sitewarm
Cache warming is requesting your pages through the CDN right after a purge or deploy, so the CDN fetches and stores them before visitors arrive. The first real visitor then gets a cache hit instead of waiting for your origin server. This article explains what a purge does to a CDN, what a cold cache costs, and when warming is not worth it.
What is cache warming?
A CDN fills its cache on demand. When a PoP receives a request for a page it does not have, it fetches the page from the origin, or from an upper tier, stores it, and serves the copy to later visitors until its TTL runs out. Cache warming triggers those first fetches on purpose, from the regions where your visitors are, instead of leaving them to whoever arrives first.
The usual list of pages to warm is the XML sitemap: it already names the pages you want served fast. Warming only helps pages the CDN is allowed to cache, so it starts from correct `Cache-Control` headers.
What happens to a CDN after a purge?
A deploy usually ends with a purge, so visitors stop seeing the old version. CDNs offer two strengths of purge:
- Soft purge, or invalidation: the cached object is marked stale but kept. Fastly soft purge, Akamai invalidate and Cloudflare invalidate work this way, so the edge can revalidate the object with the origin, and serve it under `stale-while-revalidate` when the headers allow.
- Hard purge, or deletion: the object is removed. Akamai calls this delete. A standard Fastly purge, a Cloudflare purge and an Amazon CloudFront invalidation also remove the object, so the next request is a full miss. Note the naming: an Amazon CloudFront invalidation removes files, while a Cloudflare invalidation only marks them stale.
Scope varies too: one URL, a prefix, a host, a cache tag, or everything. Either way, every purged page is cold until something requests it again, in every PoP. The Top 10 CDNs comparison lists which purge options each CDN offers.
Four effects of a cold cache
1. A thundering herd on the origin
When a popular page is purged, everyone who asks for it before it is cached again is a miss. Without protection, each of those requests reaches the origin at once. Request collapsing merges concurrent misses for the same object into one origin request: Fastly documents it, and Cloudflare calls its version a cache lock. It works per location, though, and the collapsed requests still wait for the first one to finish.
2. Slower first responses
A miss adds the round trip to the origin, and the time to generate the page, to TTFB. The first visitors to each page in each PoP pay that cost. With many pages and many PoPs, that is a lot of first visitors.
3. A lower hit ratio
Right after a purge, the cache hit ratio for the purged pages is zero. Pages with steady traffic in a region recover quickly there. Pages with little traffic per region stay cold longer, and some are evicted before anyone reuses them.
4. Origin cost, and why tiered caching is not enough
CDNs do not copy each page to every PoP. Each PoP fills from its own traffic. Tiered caching, such as Cloudflare Tiered Cache, Fastly shielding or CloudFront Origin Shield, lets edge PoPs ask an upper tier before the origin, so far fewer locations call the origin. Each edge PoP still misses once, and the upper tier itself starts cold after a purge.
How a cold cache affects SEO
Search engines care about speed in two places: the experience of real visitors, and how fast their crawlers can fetch your pages.
- Google recommends good Core Web Vitals, and says that this, along with other page experience aspects, aligns with what its core ranking systems seek to reward. Good scores do not guarantee rankings.
- TTFB comes before every rendering metric. web.dev counts it as the first part of LCP, so origin time added by a miss is added to LCP too. A good LCP is 2.5 seconds or less at the 75th percentile. web.dev suggests most sites aim for a TTFB of 0.8 seconds or less. TTFB is not a Core Web Vital itself.
- Warming can help LCP through TTFB. It does not change INP or CLS, which depend on scripts and layout.
- Crawling: Google raises a site's crawl capacity limit when it responds quickly and consistently, naming latency and Time to First Byte, and lowers it when responses slow down or return 5xx or 429 errors. See crawl budget. Warming keeps the pages crawlers fetch after a deploy fast. It does not make Google crawl or index more pages.
- Visitors: slow first loads frustrate visitors and some leave. That is a business cost on its own. We make no claim that bounce rate is a ranking factor.
Warm where your visitors are
Google says Googlebot crawls primarily from IP addresses in the United States, and may crawl from other countries in some cases. The field data behind Core Web Vitals comes from real Chrome users, wherever they are. A page that is warm in the PoPs serving Googlebot can still be cold for your visitors in other regions, and the reverse. Warm the regions where your visitors are. Choosing regions from your Search Console data is planned for sitewarm.
Cold cache versus warm cache
| Cold cache after a purge | Warmed cache | |
|---|---|---|
| First visitor per page and PoP | Waits for the origin | Served from cache |
| Origin load right after deploy | Burst, driven by traffic | Paced by the warmer |
| TTFB and LCP for first visitors | Include origin time | Without origin time |
| Crawlers right after deploy | Meet origin latency | Meet cached responses |
| INP and CLS | Unaffected | Unaffected |
When is cache warming not worth it?
- The CDN does not cache the page: it is personalized, sets cookies, or sends `no-store` or
private. Cloudflare, for example, does not cache HTML by default. Fix the headers first, or warming only adds origin load. - The page has so much traffic in every region that visitors refill the cache within seconds of a purge.
- The content is fingerprinted static assets with a long `immutable` lifetime, which a deploy does not purge.
- You only soft purge, your headers allow serving stale content, and a short window of stale pages is acceptable. Revalidation then hides most of the cold start, although each stale copy still needs one request to refresh.
How sitewarm warms your cache
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. Each result maps the CDN's own value to one state, for example:
- hit(HIT)The CDN served the page from cache.
- miss(EXPIRED)The CDN had a copy but fetched the page from the origin.
- stale(UPDATING)The CDN served a stale copy while it refreshed the page.
For how ten CDNs handle cache-status headers, purges, tiers and stale content, read the Top 10 CDNs in 2026, with a caching guide for each CDN such as Cloudflare, Fastly and Amazon CloudFront.
Frequently asked questions
Is cache warming the same as preloading or priming a cache?
Yes. Cache warming, preloading and priming all mean requesting pages through the CDN so they are cached before visitors ask for them. See cache warming.
Does a CDN copy my pages to every PoP?
No. Each PoP fills its cache from the requests it receives. Tiered caching lets PoPs fetch from an upper tier instead of the origin, but each edge still misses once.
Does request collapsing make warming unnecessary?
No. Request collapsing limits how many requests reach the origin for one object in one location, but the visitors who arrive first still wait for the origin.
Does cache warming improve Core Web Vitals?
It can improve LCP, because a cached page has a lower TTFB and TTFB is part of LCP. It does not change INP or CLS.
Does cache warming improve my Google rankings?
No one can promise that. Google says good Core Web Vitals align with what its core ranking systems seek to reward, and fast responses help crawling, but rankings depend on many signals.
Which pages should I warm?
Start with the pages in your XML sitemap that the CDN caches and that a deploy purges, most important first, from the regions where your visitors are.
References
- RFC 9111: HTTP Cachinghttps://www.rfc-editor.org/rfc/rfc9111
- RFC 5861: HTTP Cache-Control Extensions for Stale Contenthttps://www.rfc-editor.org/rfc/rfc5861
- Fastly: Getting started with purginghttps://www.fastly.com/documentation/guides/full-site-delivery/purging/getting-started-with-purging/
- Akamai: Purge cachehttps://techdocs.akamai.com/purge-cache/docs/welcome-purge
- Cloudflare: Purge cachehttps://developers.cloudflare.com/cache/how-to/purge-cache/
- Amazon CloudFront: Invalidate files to remove contenthttps://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/Invalidation.html
- Fastly: Request collapsinghttps://www.fastly.com/documentation/guides/concepts/cache/request-collapsing/
- Cloudflare: Default cache behaviorhttps://developers.cloudflare.com/cache/concepts/default-cache-behavior/
- Cloudflare: Tiered Cachehttps://developers.cloudflare.com/cache/how-to/tiered-cache/
- Fastly: Shieldinghttps://www.fastly.com/documentation/guides/concepts/shielding/
- Amazon CloudFront: Origin Shieldhttps://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/origin-shield.html
- Google Search Central: Core Web Vitals and Google Search resultshttps://developers.google.com/search/docs/appearance/core-web-vitals
- web.dev: Time to First Byte (TTFB)https://web.dev/articles/ttfb
- web.dev: Largest Contentful Paint (LCP)https://web.dev/articles/lcp
- web.dev: Optimize Largest Contentful Painthttps://web.dev/articles/optimize-lcp
- Google: Crawl budget management for large siteshttps://developers.google.com/crawling/docs/crawl-budget
- Google: Overview of Google crawlers and fetchershttps://developers.google.com/crawling/docs/crawlers-fetchers/overview-google-crawlers
- Google: Locale-adaptive pageshttps://developers.google.com/search/docs/specialty/international/locale-adaptive-pages
Further reading
- CacheFly: Cache warming and its impact on user experiencehttps://www.cachefly.com/news/cache-warming-and-its-impact-on-user-experience/
- webhosting.de: CDN warming and preloading (Spanish)https://webhosting.de/es/cdn-calentamiento-precarga-optimizacion-de-la-velocidad-del-sitio-web-cache/
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.