Prompt
cdn cache purge not working
Latest observation
Oct 12, 2026
OpenAI APIWeb search: off
If CDN cache purge isn’t working, the cause is usually one of these: wrong URL/path, purge propagation delay, origin still serving cached headers, a second cache layer, or the CDN key not matching what you’re purging.
Quick checks
-
Confirm you’re purging the exact cached object
- Same protocol:
httpvshttps - Same hostname:
www.example.comvsexample.com - Same path and query string, if your CDN caches query strings
- Same protocol:
-
Verify the purge completed successfully
- API/UI may say “accepted” but the edge nodes may still be propagating
- Some CDNs take seconds to minutes
-
Check cache-control headers
- If origin sends
Cache-Control: no-storeor very short TTL, behavior can look inconsistent - If origin sends long TTL and no purge happens, stale content may remain
- If origin sends
-
Look for another cache layer
- Browser cache
- Reverse proxy like Nginx/Varnish
- Application cache
- Load balancer / edge worker cache
-
Confirm the CDN is actually caching that response
- Some responses aren’t cached due to
Set-Cookie, auth headers, cookies,Cache-Control: private, etc.
- Some responses aren’t cached due to
Useful debugging commands
curl -I https://yourdomain.com/path
Check headers like:
cache-controlagex-cachecf-cache-statusx-served-byx-cache-hitsvia
If you see something like:
HIT= still cachedMISS= not cached or just fetchedEXPIRED= revalidatedBYPASS= CDN didn’t cache it
Common fixes
- Purge by URL, not just by hostname
- Purge both http and https variants if needed
- Purge all variants if query strings/cookies create different cache keys
- Add a versioned asset name:
/app.js?v=123/app.123.js
- Lower TTL or set proper cache headers for dynamic content
- Invalidate upstream caches too
If you want, send me:
- CDN provider name
- Exact purge method you used
- Example URL
- Response headers from
curl -I
…and I can help pinpoint the issue.