Cache always DYNAMIC can't figure out why

Url ends in .png
Response from curl:

HTTP/2 200 
date: Tue, 12 Jul 2022 00:59:31 GMT
content-type: image/png
content-length: 4635
cache-control: public, max-age=1209600
expires: Tue, 26 Jul 2022 00:59:31 GMT
etag: "3005-DlAJwOiEvqagqeyC3/mojqTS/x4"
cf-cache-status: DYNAMIC
expect-ct: max-age=604800, report-uri=""
report-to: {"endpoints":[{"url":"https:\/\/\/report\/v3?s=rpOUfijQYdKSRg%2B%2B6P%2FXdMnuEm4Rq9mwRfxC0OlNRL3vLqXcsrik2QbGIGjhCizB2CtYqFvTfcm7ihpVLV4C2%2BfUpLYkQHSu%2B031Vp0r2XRe%2Bq5DP0U7lnGb7EqgmGrFgBb4CxQ%3D"}],"group":"cf-nel","max_age":604800}
nel: {"success_fraction":0,"report_to":"cf-nel","max_age":604800}
strict-transport-security: max-age=15552000; preload
server: cloudflare
cf-ray: 7295d62fdcf157fa-IAD
alt-svc: h3=":443"; ma=86400, h3-29=":443"; ma=86400

I have Expires also set to a value in the future.

Are you serving this from a Worker or a Pages Function?

Hi there :grinning:,

According to :link: this and :link: this

DYNAMIC: Cloudflare does not consider the asset eligible to cache and your Cloudflare settings do not explicitly instruct Cloudflare to cache the asset. Instead, the asset was requested from the origin web server. Use Page Rules to implement custom caching options.

You may want to check your Page Rules.

image/png should be cacheable though, by default CF caches image assets. I beleive that only applies to things they don’t cache by default, like application/json?

Check out the links. I mean Cloudflare do cache png by default, but DYNAMIC is triggered by two factors.


So there should be something wrong in your CF settings.

1 Like

Indeed there was. I had an old rule to bypass cache. Sigh. Sorry to bother everyone!

Glad to help. :grinning:

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