Browser Caching Issues

We are experiencing an issue with browser caching where we have set the following:

Cache App -> Browser cache TTL set to 3 hours as we have multiple sub-domains that will fall under this TTL bracket.

Recently we have set-up CF workers and these are running on a separate subdomain from www and the Cache-Control is always being set to 10800 (3 hours) when we have set specific page rule for this sub-domain to be a max of 30 mins.

Did we get the logic wrong as to how Cloudflare works?

I have double-checked that the hostname is correct in the page rule and it is definitely correct e.g.

https://api.domain.com/product/client/*

Any help would be appreciated, thank you.

It wouldn’t surprise me if page rules don’t trigger if it’s a worker. But I could be wrong. I know at least one @MVP has a pretty good idea of what path a request follows.

4 Likes

I believe caching related page rules run after Workers. The general order of page rules depends on what they affect.

2 Likes

Thank you for your reply.

So is it a case of changing the order of the page rules or is it a matter that these will be completely ignored by workers?

Is there anyone I can get this verified by CF?