ipdetecto.com logo
ipdetecto.com
My IPSpeed
Knowledge Hub
HomeKnowledge HubClear Cloudflare Cache
© 2026 ipdetecto.com
support@ipdetecto.comAboutContactPrivacyTermsllms.txt
Network Administration
5 MIN READ
Apr 19, 2026

How to Clear Cloudflare Cache

Purge Cloudflare edge cache via dashboard or API: everything vs URL vs prefix vs tag, propagation and eventual consistency, Workers KV and Tiered Cache caveats, and why origins must still send correct Cache-Control after a purge.

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

ModeUse whenRisk
Purge EverythingGlobal stale incident; small zonesOrigin thundering herd
Custom Purge (URL)One asset or path hotfixQuery strings may be separate cache keys
Prefix / hostnameDirectory or subdomain rolloutPlan limits on host/prefix purges
Cache-Tag purgeApp emits Cache-Tag headersRequires 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.

Frequently Asked Questions

Q.Does Purge Everything clear my origin server cache?

No—it only invalidates Cloudflare edge entries. Origin reverse proxies (nginx, Apache mod_cache), PHP OPcache, and application caches still need their own procedures.

Q.Why does CF-Cache-Status still show HIT after a purge?

Propagation delay, a different cache key (vary headers or query string), Tiered Cache upper tiers, or a second CDN in front—re-check the exact URL including scheme and query.

Q.Do Workers KV entries purge with Purge Everything?

No—KV is a separate datastore with its own delete/TTL APIs. Purge cache APIs target HTTP cache objects, not KV namespaces.

Q.Will purge spike origin load?

Often yes—cold misses refetch from origin. Schedule during low traffic, pre-warm critical URLs, and use stale-while-revalidate style headers where safe.

Q.How do I automate purges safely?

Use narrowly scoped API tokens, change tickets for production, idempotent scripts that log request IDs, and exponential backoff on rate limits.

Q.Why does one user still see old HTML?

Browser cache, service worker, ISP proxy, or DNS pointing at a different host—have them test incognito with DevTools disable cache and compare curl from outside.

Q.Are cache-tag purges instant?

They are fast but still subject to edge consistency; always verify with headers rather than assuming immediate global visibility.

Q.What if I use multiple Cloudflare zones for one brand?

Purge each zone that serves content; misconfigured duplicate zones can serve stale copies independent of your primary purge.
TOPICS & TAGS
Cloudflare purge cachepurge_cache APICF-Cache-StatusCloudflare single file purgecache tags purgeCloudflare Workers KV