Automatic Platform Optimization for WordPress / caching

I have enabled APO for wordpress on my website.
In the page rules I have set “Cache Level: Bypass” for the contact page
The contact us page has a hidden field used to record the referer url.
For some reason this field is not recording the correct referer url - it seems to be a cached version
if I do a wget -S on the contact page the header response says dynamic
if I set cloudflare into development mode it works correctly

1 Like

There seems to be a ‘dynamic’ problem with APO from what I’ve seen on my own site, and from reading the forums. I don’t know if it’s a Cloudflare problem or just interference from external elements (various origin server settings). Either way, I’m getting more ‘miss’ cache headers than I should be, and also a lot of ‘dynamic’.

EDIT: Enabling APO is most likely overriding that cache level page rule. (Not certain of this, but if you read recent posts about APO it seems to be the case.)

thanks for the response @trichstir - I am going to disable APO on the website and monitor - I think there are still a few bug that need fixing

Page rules don’t have effect on APO settings, we are looking into the possible solution.

2 Likes

I have the same problem. We need some way so that no element of a page or web path is cached (Ex. …admin-ajax.php). The page rules don’t work.

Curious if APO worker could be made to talk with page rules API to see if any page rule paths have cache bypass or respect origin cache control headers and bypass APO cache?

I wish it could be done as easy as you suggested. At the moment APO worker gets executed before we know which page rules should be applied to the request.

adds to wishlist for APO 2.0 :slight_smile:

I have tried to do it by adding this header to the pages that I don’t want to cache:

    header('Cache-Control: no-store, no-cache, must-revalidate, max-age=0');
    header('Pragma: no-cache');
    header('Expires: Thu, 01 Dec 1990 16:00:00 GMT');

But the wordpress plugins rewrite them if I activate APO. Could you change that so that the plugin doesn’t rewrite them? Could you add a configuration to the plugin to indicate what you want to exclude from APO?

You can disable APO for any page by sending:

header( 'cf-edge-cache: no-cache' )

We don’t plan on adding a configuration to exclude pages from APO via UI.

2 Likes

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