Caching html based on origin headers

We want to be able to choose which html pages we cache based on Cache-control headers returned by our origin server and NOT based on url rules.

Assuming I set up a full domain page rule to cache everything (which i believe is always the starting point), how can I tell Cloudflare NOT to cache the response for a particular page?

From this article: https://support.cloudflare.com/hc/en-us/articles/200172256

it appears that as soon as you turn on Cache everything and set an edge TTL then every page will be cached irrespective of the headers I return from the server, is that correct?

Yes, Edge TTL overrides even cache-control: private.

I believe that if you set up cache everything, but not edge cache TTL, CF will cache HTML as long as the cache-control is public.

1 Like

This topic was automatically closed after 30 days. New replies are no longer allowed.