Fundamentals

What is cache warming? A practical guide

July 2026 · 8 min read · ← All posts

Every cache has the same embarrassing secret: it starts empty. The fastest CDN in the world serves its first request the slow way — all the way from your origin server, database queries and all. Cache warming (also called cache preloading or cache priming) is the practice of filling caches proactively, before real users arrive, so that the first visitor gets the same instant response as the millionth.

The cold-cache problem

A cache stores the result of expensive work — a rendered HTML page, a database query, a resized image — so the work doesn't repeat. But entries appear in a cache only when someone requests them, and they disappear constantly:

The result: on most sites, a surprisingly large share of requests are cache misses — especially on pages that aren't the homepage. Those visitors get the slow experience, and they're disproportionately first-time visitors, the ones you least want to greet with a three-second load.

How cache warming works

The mechanism is disarmingly simple: request the page before a user does. A warming request is an ordinary GET request. The cache in front of your origin sees a miss, fetches the response, stores it — and every subsequent request within the TTL is a hit. The complexity is in doing it right:

  1. The right URLs. Warm the pages people actually visit — usually everything in your sitemap — not a hand-maintained list that rots.
  2. The right shape. The request must look like a real browser request (matching Accept-Encoding, no cache-busting query strings), or the cached variant won't match what visitors request.
  3. The right places. For CDN caches, requests must enter the network where your visitors are — more on that below.
  4. The right rhythm. Warm slightly more often than your TTLs expire, and re-warm after every deploy or purge.

Which caches can be warmed?

Server-side caches

Page caches (WordPress plugins, Varnish, Nginx proxy cache), object caches (Redis, Memcached) and opcode caches live on or near your origin. One crawler visiting your URLs warms them fine — this is what most WordPress "preload" features do, and it's genuinely useful.

CDN edge caches

This is where it gets interesting. Cloudflare operates 300+ data centers, Fastly, Akamai and CloudFront hundreds more — and each edge location keeps its own cache. A request from a server in Virginia warms the Virginia edge. Every other location stays cold. To warm a CDN properly, requests must genuinely originate from many regions, so each one enters the network at a different edge location. That's the part a plugin on your own server structurally cannot do.

Application-layer edge caches

Frameworks that render at the edge (Cloudflare Workers, edge functions) often use their own per-location cache — for example the Cloudflare Workers Cache. Same rule: per-colo, warmable only by requests that actually land in that colo.

When is cache warming worth it?

Warming pays off most when misses are expensive and frequent:

It matters less on sites with a handful of pages and heavy traffic in one region — organic traffic keeps those caches warm on its own.

Measuring success: hit ratio

The metric to watch is your cache hit ratio — the share of requests answered from cache. Before/after warming, it typically moves from "fine on the homepage, poor everywhere else" to consistently above 90%. The user-facing effect shows up as TTFB: warm cache hits are served in tens of milliseconds; cold misses cost whatever your origin costs.

DIY or a service?

A cron job with curl over your sitemap is a fine start for warming server-side caches. For CDN caches you additionally need geographically distributed egress, CDN-specific cache-status parsing, pacing, sitemap re-discovery and hit-ratio reporting — which is the point where a dedicated service earns its keep.

Warm your cache in 90+ edge locations

warmup.rocks warms Cloudflare, Fastly, Akamai, CloudFront and more — from 42 countries, on your schedule, with per-colo hit-ratio analytics.

Start your 7-day free trial