This is a strange one, hopefully someone can provide some guidance.
We deployed a change on Thursday 11th June to change a text string which was common across all pages. This was picked up during testing and all seemed fine. We can’t confirm if we specifically checked the site homepage but this is where the issue was raised today.
To summarise the issue:
- Today, the homepage was showing the original string
- All other pages show the new string
- All pages are set to Max-Age 14400, so the homepage should have cleared many times since Thursday
- The issue was replicated across three machines, each showed the old string
- We purged the URL using our API integration with the website CMS at 11:10 this morning
- By time I tested during a call with our developer (12:10) it was still the old string
- My machine showed “HIT” and age: 3656, which ties up with it being 1 hour old, but still the old content?
- Ten minutes later I checked in Firefox and suddenly the string was updated, and was updated for all users.
The main questions are:
- How long does it (or can it) take to clear the cache after a Purge? This will help us communicate expectations to our client
- Is it possible for some PoPs to be up-to-date but others lagging behind?
- Why would Cloudflare not clear and reload a page after the Max-Age? (our headers are below)
Some further points:
-
We are using Chrome primarily for debugging, but with Dev Tools open and the “Disable Cache” option selected. I don’t particularly trust Chrome’s caching engine, but this was replicated across multiple machines.
-
Our headers typically look like:
age: 9589
cache-control: public, max-age=14400
cf-cache-status: HIT
cf-ray: 5a3c78667871362d-MAN
cf-request-id: 0359a9940f0000362def8ab200000001
content-encoding: gzip
content-type: text/html; charset=utf-8
date: Mon, 15 Jun 2020 12:59:47 GMT
expect-ct: max-age=604800, report-uri=“https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct”
expires: Mon, 15 Jun 2020 14:19:58 GMT
last-modified: Tue, 09 Jun 2020 20:06:38 GMT
server: Cloudflare
status: 200
vary: Accept-Encoding
If anyone can give us some insight, or any better techniques for debugging such situations I’d really appreciate it.