Caching/Browser Cache Expiration vs Page Rules/Browser Cache TTL

Hi. I’m hoping someone can help me understand this stuff. I’m a developer, not a network/http expert so any insight gratefully received

The caching page has a setting for Browser Cache Expiration
In page rules you can set Browser Cache TTL

From what I can tell they both do the same thing
But they can both be set to different values?
So, which one wins / takes priority?

Same question for caching/caching level
and page rules/cache level

I’m kinda assuming the caching page settings are overridden by for anything in the scope of a page rule? But I can’t find anything in the docs about that.

Finally, even though I’ve set both to 4 hours, I’m still seeing 48hrs in the headers coming from Cloudflare:
cache-control: public, max-age=172800
cf-cache-status: HIT

EDIT: Sorry, I had misread what you meant by “caching page”. The page rule will take precedence for the URL(s) it matches over any general setting applied on the dashboard, including those on the Cache tab.

You are assuming right, page rules set exceptions based on a URL (or URL pattern) to whatever global settings you have elsewhere on the dashboard.

You’d need to check your origin to see if it’s setting a higher value (48 hours) for caching of the given file type.

Thanks. I missed the part about CF only replacing cache-control if it’s longer than the origin.

1 Like

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