APO versus Cache Everything (Page Rule)

Hello, I would like to know if it is possible to use APO (Automatic Platform Optimization) at the same time as Cache Everything in Page Rule?

Music Bay www.music-bay.net
MySQL 10.3.31
PHP 7.4.25
WordPress 5.7.4
Host: VPS Hostinger

Yes, it’s quite possible.
for more info visit here - https://blog.cloudflare.com/automatic-platform-optimizations-starting-with-wordpress/

Great, it is a mine of information on APO, thank you. However, I haven’t found the answer to my question, nothing about the behaviour of a site that has both APO and CACHE EVERYTHING (Page Rules) activated at the same time. Has anyone tried it yet?

APO should complete the “cache everything” for resources that are safe to cache.

But if you want to override that, you’re certainly welcome to give that Page Rule a try.

What is it you’re trying to cache? As it’s an ecommerce site, this often causes unintended behavior.

1 Like

Yes, it’s an e-commerce site, bad luck…)
In fact, I’m trying to find a solution to speed up the site as it has become slow. This post is related to my other post on the forum. My site has the Cache Everything rule enabled and I was wondering if adding APO can improve its performance. Because I see that all elements of the site, except the HTML, are either DYNAMIC or MISS. The question I have is: can APO activated at the same time as Cache Everything make these Dynamic and Miss disappear; to have HIT everywhere?

That is a bit of a mess at the moment. It doesn’t look like you have APO activated. Is this correct?

You’re also loading most everything through…KeyCDN? That’s where all the DYNAMIC and MISSes are coming from. If you want to make those disappear, you’ll have to talk to KeyCDN.

It’s true, APO is not activated at the moment because I’m trying to find out what is compatible with what (Cache everything/APO/CDN etc…).

The KeyCDN technician told me that ‘the fault is on Cloudflare’s side’. But without specifying which fault and how to fix it.

Do you have any suggestions on how to fix this ‘mess’-)?


Did you turned on the proxy to the dns were cdn is configured make sure it’s dns only secondly

Unless the kxcdn domain belongs to you, you can’t fix it. Other than to stop using that CDN. That’s what I’d do since they’re just using Cloudflare anyway and not adding much value.

No, I don’t own KeyCDN (yet) -)

We started by connecting the site to Cloudflare CDN. But there were problems, so we had to find another CDN. Until recently the site was very fast and efficient, so it worked fine. But now we may have to consider changing again and - why not - going back to Cloudflare’s CDN…
In any case, the KeyCDN technician clearly accuses Cloudflare of slowing down the site. He says:
Please check the waterfall chart in the test results. It shows that The first delay comes from the initial HTML loaded from Cloudflare.

Assets loaded after the initial HTML are also slowed down by Cloudflare, not by KeyCDN. See Cloudflare MISS (cf-cache-status) in this screen shot: https://snipboard.io/BgYvLZ.jpg

@ cloudcreatr

We do not have a CDN at Cloudflare but at KeyCDN. Only our DNS are at Cloudflare. So I guess your message is not about us, is it?

They just pointed to a file at kxcdn. How is that not their issue?

All I can say (again) is to stop using KeyCDN.

You have APO active, and I’m not seeing that delay now that it’s cached.

Very true!
I will go back and ask the KeyCDN technicians for an explanation. But I feel that our adventure with them is close to the end.
Just this: at the moment we have no APO activated yet.

Ah, maybe you have that Cache Everything page rule. But it looks like it’s for the entire site, which is going to bite you if anybody tries to shop. Best to let APO handle all that.

1 Like

Wait a minute, it’s super important what you just said! Yes, that’s the Cache Everything rule turned on. Why is it going to bite me if anybody tries to shop? Can you explain this, please?

That unintended behavior is someone visiting a page and seeing the previous person’s shopping activity. They may be able to view a cached version of /checkout/

Many thanks, it’s clear now! I will of course immediately take APO in this case.
But then we come back to my question - title of this post: can we use APO and Cache Everything together, or is it not necessary because it’s a duplication?
Or maybe: APO is good for the whole site and add the Cache Everything rule just for some pages ? (avoiding the Checkout page)

APO should be good enough since it will cache HTML pages. Sometimes people want to force a page or two to be cached, no matter what. In your case, it’s all a shopping site, so I’d avoid a Cache Everything rule.

Keep in mind that APO won’t cache once someone is logged in or starts shopping. Those pages require live updates. The drag is that those pages will be back to as slow as they were before without the cache. Nothing you can do about that except optimize your site’s software or get a faster server.

Thank you, I note your remarks!

I’ve taken APO just now. I also installed the Cloudflare plugin but in the plugin setting I see the message: cf-edge-cache response header is missing!

And when I turn the button ON, it keeps turning OFF.

And on the Cloudflare side, there is this message:
Note: The WordPress plug-in was not detected in music-bay.net.
Please check again

How can I fix this?
Thank you

Make sure the Cache Everything rule is disabled. Then try a Cache → Purge (Everything).