Max-age of 1 year and Edge Cache TTL for Static Resources

We have set max-age in the cache-control response header as 365 days for images. What will be the Edge Cache TTL in this case? I am asking this question because I think, the max Edge Cache TTL supported by Cloudflare is 1 month.


That’s correct, browser is 1 year, and Edge is 1 month.

But I can say that in Edge cache’s case, most files will get kicked out way before that due to lack of use. TTL is how you let a cache know how long it’s ok to store a file, but no longer than that.

For example, if you know you update frequently, you don’t want a long TTL, so you lower it just to be safe. No harm done. With a too-long TTL, and you change something, you’re somewhat stuck with people seeing old content.

Hi Sdayman,

Thanks for the response.
So if a resource has a max-age of 365 days, will the resources be assigned an Edge Cache TTL value of 1 month(I understand that it may get purged earlier)? Just want to make sure that Cloudflare will not ignore it as 365 days is way over the max allowed value for Edge cache TTL.


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