Bypass cache page rule not working

I’m trying to disable the cache site wide as it causes problems with my ecommerce (Magento 2) specifically the basket not updating. Adding the page rule makes no difference.

The basket won’t update or remove an item until I flush the cache on cloudflare, which then shows me an empty basket on my site, but adding a product again requires another cloudflare cache purge before it’ll show up.

I’ve currently set the page rule as follow;

Any help would be greatly appreciated

the domain example is with asterixs either side, they got stripped from the text after submission

Try getting rid of that first dot, so it’s **

If you need more assistance, please post the actual domain name.

Please note that Cloudflare does not cache Page HTML by default, so this sounds unusual. There are plenty of other posts regarding “magento cache” that discuss caching behavior.

Thanks for your reply.

I’m terribly sorry , I’ve found the problem.

The below code was attached to one of my workers;

return fetch(request, { cf: { cacheEverything: false, cacheTtl: 3600 } })

Removing the cf:{} parameters fixed it. I’m very new to workers and thought it would only be confined to any redirects within it, not globally to everything under the domain it was assigned.

Sorry to waste your time, and hopefully leaving the info here will help other people!

1 Like

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