Why is cf-cache always DYNAMIC
Could someone please help me understand an issue ? Cross posted here:
https://community.cloudflare.com/t/why-is-the-requested-resource-not-cahced/592894
Thank you
Cloudflare Community
Why is the requested resource not cahced?
Any idea why this resource is marked as DYNAMIC instead of a cache HIT ? Resource URL: https://images.oncehubassets.com/themeso/_1667485414370_OTA3MjExOTIyMDY=_logo002jpg Response headers: HTTP/1.1 200 OK Date: Mon, 18 Dec 2023 05:40:55 GMT Content-Type: image/avif Content-Length: 3507 Connection: keep-alive CF-Ray: 837512e7eacd02d7-CDG CF-C...
8 Replies
This should help: https://developers.cloudflare.com/cache/concepts/default-cache-behavior/
Default Cache Behavior · Cloudflare Cache (CDN) docs
Cloudflare respects the origin web server’s cache headers in the following order unless an Edge Cache TTL cache rule overrides the headers.
Thank you. Are you referring to the
Default cached file extensions
section ?Would that be the correct cache rule syntax ?
I am still getting "Dynamic" after deploying this cache rule
Your hostname will never equal “*” it’s not regex it’s a literal equals. You can click edit expression and just put true if you want to always cache everything
Still showing DYNAMIC so I suspect there's something that is overriding it
https://developers.cloudflare.com/cache/how-to/cache-rules/settings/#eligible-for-cache-settings
Currently, Cache Rules are not compatible with Image Resizing. Cache Rules will not be applied to Image Resizing requests. Page Rules are supported.
Cache Rules settings · Cloudflare Cache (CDN) docs
These are the settings that you can configure when creating a cache rule.