APO cache not working, cf-cache-status: DYNAMIC

Hi,

I noticed that enabling APO does not seem to cache content on my website anymore. All requests come with the cf-cache-status: DYNAMIC header, which normally means cache is not being used (the header should be HIT). I’m also seeing these headers: cf-edge-cache: cache,platform=wordpress and x-via: speedwp/origin,cookie. TTFB has also climbed to 100ms+ from the normal 30ms+.

A few days ago, when I first enabled APO, everything was working properly. I did not change anything on my website. I read the documentation online and cannot find what could be the cause of the issue. I have tried disabling all Page Rules and Workers, but to no avail.

If others could check if they are also getting the cf-cache-status: DYNAMIC header while using APO, we could figure out if this is an issue on Cloudflare’s end or if it is only on my end.

Thanks for your help.

Edit: I can confirm that APO is actually caching and returning the cached content properly, but there still an outstanding issue related to Wordpress cookies being detected by APO on different browsers even though there are no logged in users on those browsers.

Edit 2: So I figured out the problem. If you have Taboola on your website, you will also suffer from this issue. There seems to be a conflict with APO’s bypass cache on cookie system and the Taboola cookie that is added to all visitor browsers. This means that all visitors visiting a website with Taboola will only get cached content (HIT) on their first visit when they have no Taboola cookies set. They will get uncached content (DYNAMIC) on all subsequent visits.

1 Like

I am also having the same issue, waiting for the reply - Automatic Platform Optimization

2 Likes

So that makes us two. I wonder if more people are affected by the issue, maybe even without knowing it. Unless I am debugging something, I rarely check headers in Chrome Dev Tools.

ATM, the whole APO thing is a little bit tricky for some people.

Look here:

or here:

So, because of reasons, i cannot enable APO, or my site looks like ■■■■.

Regards.

All you need to do is switch off all Custom Page Rules.

As everything is taken care by APO including wp-admin.

As mentioned previously, I have already tried that, but the issue persists.

There must be another issue with APO and the integration in WP (or connection to CF Main).
Steps:

  1. as @kunal.desai1 mentioned, i switched off all page-rules
  2. enable APO
  3. Purge CF cache
  4. Open Browser (Incognito for clear browser cache)
  5. Open a page of the site
  6. In WP edit the page and change some text
  7. save
  8. In browser hit F5 --> nothing changed
  9. In browser hit Strg+F5 --> page would reloaded correctly with the changes
  10. Close Incognito thing
  11. Open new Incognito Browser
  12. Call the same Page again --> Page would served from Cloudflare WITHOUT the last changes.

And this is exactly not what Cloudflare says in the APO-documentation!

Regards.

Kindly provide your site addresses.

I too disabled all the Custom Page Rules still it’s not working.

Site URL: https://insidebedroom.com/

Note: Sometimes, it is working for the homepage but for other posts, it’s not working.

My website address is: https://www.ipnoze.com/

Please note that APO is currently disabled on my site as I do not want to enable it while it is not working.

@kunal.desai1, other threads are popping up about this issue. I think the APO team might want to look into it.

I know @yevgen confirmed that the query string bug had been resolved yesterday. I’m wondering if maybe this might have something to do with the cache not working anymore with APO?

OK, after some testing my page https://www.dimatec.de
i cannot found any issues.
I switched off every pagerule in cf (and if this is the trick when you use APO, then those things must into the documentation!).

Instead of one little thing: Some content in /wp-content hasn´t a browser-cache set. Before the page-rule did this.

I will try to figure out how to prompt some problems with APO, but currently it looks nice.

Thank you @kunal.desai1 for the tip!

Regards,
Laszlo

Sorry to be the bearer of bad news, but after performing a quick test on your website, TTFB is 943ms (should be easily under 100ms) and header is also cf-cache-status: DYNAMIC, which means APO is not caching properly.

Let’s hope Cloudflare fixes this soon.

I can report the same issue too.
Getting DYNAMIC in headers
Disabling all page rules is simply not an option as I use page rules for things other than Wordpress on my domain

Hi @janvitos,

yes, u are right, i come from an other aspect of APO (destroyed looking website) and currently this seems to be working after i disable the page-rules.

What this issues affected, yes it does not work properly.

Regards,
Laszlo

For first visit it is Dynamic then it is speedwp/cache for html.

Right now, for all visits it is DYNAMIC.

Please take this issue more seriously. APO is currently NOT caching for everyone (most probably).

Every single website I tested returns DYNAMIC in the cf-cache-status header.

Thanks.

Again @janvitos,

how did u measure the ttfb of my site?
If i measure it via webpagetest, the ttfb is 0.142 sec for the first request (measured from amsterdam, near by the customer).
Thats absolutely fine for me!

Regards,
Laszlo

I measured the TTFB using Chrome Dev Tools. I’m in Canada and your server is in Amsterdam, so that’s why I’m getting a high TTFB. But since your customers are in Amsterdam, then my results are most probably of no importance to you.

I simply posted the TTFB to show that your website currently suffers from the same APO bug as my website and many other websites on this forum.

If APO was working on your website, I would’ve most probably gotten a TTFB of 100ms or less from your website, even if I’m in Canada, because of Cloudflare’s multiple datacenters around the world.

Especially since I switched on Argo, which means for me that the content is distributed more effectively than without Argo.

APO does not work. Does nothing