Origin Cache Control and Business Plan

We are on the business plan and it says the caching via page rules is limited to 30min. Wondering if we set the origin cache control in our APIs to 1 minute will cloud flare respect this?

I suppose you could test this. Have you tried it yet?

2 different caches operating

If you set origin cache control to respect origin, then you’re controlling browser cache not cloudflare cdn edge cache.

The 30min min cache TTL is for cloudflare cdn edge cache.

So in your example, you’d had cloudflare edge cache at 30 min cache ttl and browser cache control via CF cache control has it’s own limits https://support.cloudflare.com/hc/en-us/articles/115003206852

when you don’t set respect origin cache control

Cloudflare respects whichever value is higher: the Browser Cache TTL in Cloudflare or the max-age header.

when you do set respect origin cache control

Unless specifically set in a Page Rule , Cloudflare does not override or insert Cache-Control headers if you set Browser Cache TTL to Respect Existing Headers .

2 Likes

As was mentioned above, the answer is a definite yes. I have a site that specifically sets 60 seconds for one specific file, while all other files are immutable and are therefore cached for days/weeks.

The trick is to not set the Browser Cache TTL and do not set the Edge Cache TTL via Cloudflare, allowing you to manage everything with Cache-Control headers.

1 Like

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