What you are purging
Cloudflare sits in front of your origin and caches HTTP representations according to page rules, Cache Rules, origin Cache-Control, and product features (Tiered Cache, Argo, etc.). Purging removes selected entries from Cloudflare’s edge—it does not fix wrong headers at the origin, and it does not clear Workers KV, R2, or the visitor’s browser cache by itself.
Purge modes
| Mode | Use when | Risk |
|---|---|---|
| Purge Everything | Global stale incident; small zones | Origin thundering herd |
| Custom Purge (URL) | One asset or path hotfix | Query strings may be separate cache keys |
| Prefix / hostname | Directory or subdomain rollout | Plan limits on host/prefix purges |
| Cache-Tag purge | App emits Cache-Tag headers | Requires app support and header size discipline |
API pattern
Automation uses POST /zones/:zone_identifier/purge_cache with a JSON body ({"files":["https://…"]}, {"prefixes":["https://example.com/blog/"]}, {"tags":["release-42"]}, or {"purge_everything":true}). Use API tokens scoped to Zone.Cache Purge with least privilege; throttle retries on 429.
Verify propagation
Edge is eventually consistent—compare CF-Cache-Status and Age from multiple PoPs or use curl with resolved edge IPs. If HTML updates but assets do not, purge JS/CSS keys or adopt fingerprinted filenames.
Related: Clear browser cache, Clear nginx cache, Flush DNS cache, How DNS works.