Cache not refreshed on specific page after Max-Age or API purge URL

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.

I should say this site is set to Cache Everything, with our updates pushed from the CMS via an API Purge URL call when content is changed and published.

A Purge should take effect globally within five seconds. The Purge message says 30 seconds, just to be safe. No POP should lag behind.

This one hasn’t aged out yet.

As an additional test, try Purging a specific URL in the Cloudflare dashboard, the copy/paste that URL into a browser and see if it cleared.

Hi

Thanks for the reply. I understand that the example above hadn’t ages out, however the issue is with the change that was made on Thursday not having updated by Monday. We had to Purge it manually to get it to update.

I’m right in saying that CloudFlare will go back to our server every four hours to get a latest copy? So it should have had the correct text within 4 hours of our deployment?

It’s supposed to work that way. In certain situations, it might even be less, but not more. If it doesn’t, then let Support know.

Thanks - I’ll follow up with Support.

We believe this has happened a few times now, but certainly not consistently. It’s very hard to replicate but this week’s example at least we have a good idea of timings.

Speaking again to our developer, it cleared and updated for him immediately after Purging via the API, but an hour later I still had the old copy, and despite CTRL+5 a number of times it didn’t update until I opened it in Firefox, after which Chrome also updated.

This topic was automatically closed after 30 days. New replies are no longer allowed.