How does Asset Optimization enable long-term-cacheable-without-revalidation?

Hi, I’m trying to research on the subject of caching with Netlify.

According to this blog post,

you can experience the benefits of our asset post-processing into long-term-cacheable-without-revalidation if you enable Asset Optimization for your site — but we’ll need another blog post to talk about that how and why.

I do not see another blog post about this. I only see this one about controlling these settings via netlify.toml.

What was the first post talking about at the end there? Does Netlify turn off must-revalidate when asset optimization is enabled?


Hi, @robert, there is no follow-up blog post. I believe it was mentioned only as a hypothetical post and I don’t know if the author ever actually intended to create it.

With assets hosted on our CDN, we’ll use the following header:

cache-control: public, max-age=0, must-revalidate

For assets that have been processed by our asset optimization, the header looks similar to this instead:

cache-control: public, max-age=31556926

This allows for the long-term caching of the asset.

​Please let us know if there are any other questions about this.