I have a page rule which sets cache level = cache everything and Edge TTL = 1hour for resources which match a desired path. In the rare case where I need to manually purge an item from the cache prior to the 1 hour expiration, it never seems to work. I have attempted both the Cloudflare Dashboard’s Custom Purge option and API calls. Both methods report that the request was successful, however the content is not purged. The original content is still returned and the Age header continues to climb until reaching the original 1 hour (3600) upon which time it will finally fetch new content.
What steps have you taken to resolve the issue?
I have used the custom purge tool on the CF dashboard as well as via the API
What are the steps to reproduce the issue?
Load a URL which matches the page rule
repeat the process to ensure the CF-Cache-Status header is ‘HIT’
execute a purge request & verify the request is successful
wait 5, 10, 15, 30 minutes…
Load the desired URL
see the CF-Cache-Status header is still ‘HIT’ & old data is returned
Thanks for the quick response. Yes, I’ve tried different browsers and applications. Raw curl calls from the command line - all come back with CF-Cache-Status: HIT and the same stale data.
One more thing in my head to try out before I’d proceed further with either troubleshooting or contacting Cloudflare Support, if you append the query string to the URL resource, like e.g. https://example.com/something?abc=12345 does it then the request go to the origin host, to catch the new updated resource?
If you temporary unproxy or temporary Pause the Cloudflare, is there any chance that some HTTP cache headers are sent from the origin, or cached at the origin via some service like litespeed or nginx or 3rd-party cache system?
I’ll test within my zones if I could reproduce the same via Dashboard and API if I can make Purge or not.
if you append the query string to the URL resource, like e.g. https://example.com/something?abc=12345 does it then the request go to the origin host, to catch the new updated resource?
yes, changing the url parameters bypasses the cache and retrieves fresh data from the origin
If you temporary unproxy or temporary Pause the Cloudflare, is there any chance that some HTTP cache headers are sent from the origin, or cached at the origin via some service like litespeed or nginx or 3rd-party cache system?
Unproxying the domain, or disabling the Page Rule, causes the request to reach my origin and return the proper fresh response. The responses do contain cache-control headers such as Cache-Control: public, max-age=1800 and ETag