Cloudflare Cache Issues for WP Website

I have been having cache issues for months where the website cache will not purge. The TTL is set to 30 minutes in Cloudflare, but if you visit and check the bottom for our blog posts, you still see only April 6th content. I just posted stuff today and mid-month and can see it when I am signed into the site. I have no idea how to make this cache work properly. None of our other sites (50+) appear to have this issue.


When APO is enabled for a domain, the TTL is set to a month, regardless of what you may have set in your Cache-Control or Cloudflare TTL (unless you’re using Page Rule or Cache Rule). And that’s the expected behavior.

Your site, when visited with the Dev Tools > Network > Disable Cache unchecked is returning a page that was cached by APO. However, it’s not returning the header that is added by the Cloudflare plugin: [cache,platform=wordpress].

Disable Cache OFF


As soon as I check Disable Cache, APO cache is bypassed and I see your most recent content (a post about the upcoming Windows 12).

APO is supposed to invalidate the cache within 30 seconds of a change in the content. But without the plugin properly installed, Cloudflare APO has no way of knowing the page has changed.

So make sure the Cloudflare plugin is properly installed and enabled for the domain, and that should fix your issue.

I think I mostly understand! I dont actually have the Cloudflare plugin, but I am using Lightspeed Cache plugin as well. Should I have both? Or just one?

As well, what is APO :face_with_open_eyes_and_hand_over_mouth:

You should use both. Cloudflare plugin will interact with Cloudflare APO and, in case you don’t want to have APO, will allow you to set “auto purge on content update”, which is also very helpful to avoid the situation you’re facing.

LiteSpeed Cache will prepare the local cache, so that when the page is not on Cloudflare’s cache, and Cloudflare makes a request to the origin, local cache will be served as opposed to having to render the page at each request. You should also set your Cloudflare API token at LiteSpeed Cache CDN tab.

Automatic Platform Optimization for WordPress is a service that will cache all pages at every Cloudflare data center for a month, making your site super fast with very little configuration. Please take some time to get familiarized with APO and how it works:

1 Like

You have been awesome. Thank you!

1 Like

Sorry for responding again. I actually didnt have APO purchased/turned on and realize what you were saying is that APO was causing my issue. I just bought APO and now I am trying to understand what I should do to ensure that the cache will actually purge upon content updates.

Or if I am doing blog posts every 2-3 days should I NOT use APO?

Assuming you also installed the Cloudflare plugin, first you should now purge all cache from Cloudflare. Then visit your site with Dev Tools open on Network tab, but with Disable Cache unchecked. See if it’s caching the content after a couple of reloads. If you see the 3 headers it should be working.

Then you’d need to change content somehow, perhaps changing a word or two from a post, and visit that post to see if it was updated. As new content is published, make sure to test after a minute or two with an incognito window to check that the site (home page, category page, etc.) is being updated.

APO can be used even if you update posts or add new posts every other minute.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.