Some of my Images not cached

I am pretty confused on how cloudflare images work, some of my images cached and some are not, maybe I have some misunderstanding with cloudflare cdn.
Let’s say I have a site with:

I want to cache all images for 1 year on

Should I use page rules or cache rules?

I have already made sure the cache control is public with max age=31536000. Can you recommend a setting that can override cache control and cache the images for 1 year?

For now, I’m testing it using, and it seems to work, but I don’t know if my configuration is correct.

Page Rules:

  • Cache Everything
  • Edge TTL = 1 month

Cache Rules:

  • Hostname:
  • Eligible for cache
  • Ignore cache-control header and use this TTL: 1 year

Some typo, my page rules was like this

Page Rules:*

  • Cache Everything
  • Edge TTL = 1 month

You can’t. You can configure the maximum amount of time for which they will be cached, but Cloudflare can drop them from the cache at any earlier time.

You can use either rule set, though with page rules you need to make sure to specify* as otherwise you’d only cache the root path, which you don’t want.

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