I have been attempting to deal with a frustrating issue for over a week now.
I’m seeing multiple problems with stale content:
- Seems like multiple Cloudflare Edge Cache servers are all out of sync.
- Hard refresh (Command+Shift+R on Chrome+Mac) will show a different page each time.
- GET API calls also seem to be cached, but I am expecting it to be dynamic
- Most of the website logged in experience is dynamically generated pages. Also seeing a lot of static content here
- Hard to get a good load of the page where everything is fresh.
Here is the page/website that I am having problems with.
- Single origin server, not load balanced
- Always works in development when hitting the machine directly, these problems are only observed in production (behind Cloudflare)
In my deploy script, I will make an API call to clear the cache (Purge Everything) as a post-deploy step. I also manually press the button on the Caching settings multiple times, problem still persists.
I created this page rule:
Disable Security, Browser Cache TTL: 30 minutes, Always Online: Off, Cache Level: Bypass, Edge Cache TTL: 2 hours, Origin Cache Control: Off, Disable Apps, Disable Performance
still things being served vary on each reload, and are stale.