Cloudflare Revalidation: A Guide for Website Owners
Learn how Cloudflare revalidation checks expired cached content, when stale content may be served, and how website owners can request a fresher copy.
Facts that can change should include a source and check date. Benchmark claims should state the plan, region, method, and test period.
If a Cloudflare-cached page has expired, revalidation checks the cached copy against your website’s origin. If the content is unchanged, Cloudflare can assign it a new time-to-live (TTL); if it has changed, Cloudflare replaces the cached copy. To request a fresh version sooner, use Cloudflare cache invalidation or purging.
How revalidation works#
Revalidation generally occurs after a cached copy expires. Cloudflare asks the origin whether the cached content is still current:
- If the origin content is unchanged, Cloudflare can continue using the cached copy with a new TTL.
- If the origin content has changed, Cloudflare replaces the cached copy with the updated response.
Expiration and revalidation are different events: expiration makes the cached copy due for checking, while revalidation determines whether that copy can continue to be used.
What visitors may see during the check#
If the origin includes stale-while-revalidate in its Cache-Control header, Cloudflare may continue serving the expired copy while requesting an updated version from the origin in the background. This can let visitors receive the existing content while Cloudflare performs the check.
Without that directive, visitors wait for the origin’s response before receiving the content. The exact behavior described here is part of Cloudflare’s documented cache system; it should not be assumed for every hosting or CDN provider.
When to use purging or invalidation#
Normal revalidation is generally triggered by expiration. If you have published a change and need Cloudflare to fetch a fresh version sooner, use Cloudflare’s cache invalidation or purging options. This is the appropriate action when waiting for the existing cached copy to expire is not suitable.
Practical guidance for website owners#
- Decide whether serving an expired copy briefly is acceptable for the content.
- If background updating is appropriate, configure the origin’s
Cache-Controlheader withstale-while-revalidate. Cloudflare may then serve the expired copy while checking for an update. - Allow normal expiration to trigger revalidation when an update does not need to appear immediately.
- Use Cloudflare cache invalidation or purging when a fresher version is needed sooner.
- Check the relevant provider documentation before applying these expectations to another hosting or CDN service.
Sources
- Cloudflare: Revalidation Checked 2026-09-29
- Cloudflare cache documentation Checked 2026-09-29