AI OnAI Off
Turning off or reducing caching duration:
ETag or Last-Modified Headers:
304 Not Modified
, avoiding unnecessary data transfer while ensuring users see the latest version.If invalidating assets immediately is critical:
max-age
values when assets change frequently.Ensure Episerver is set up to generate accurate ETag
and Last-Modified
headers. This way, Cloudflare revalidation remains efficient and reliable.
Add this project to your Solution, it gives every file version a unique URL.
I'm trying to figure out the best way to configure our caching strategy. Media assets, mainly PDFs, are uploaded into CMS, are updated frequently, and keep the same file name. Cloudflare seems to serve cached versions of these media assets for a long period of time even after the PDF has been updated in the CMS. It seems like the max-age value on the cache-control header varies from PDF to PDF. Is there a best practice to follow to ensure that CDN cache is evicted when a media asset is updated in the CMS?