Skip to main content
sitewarm
Rank 7 of 10 on caching criteria

Netlify CDN caching guide

Netlify · reviewed against the vendor documentation listed below

How Netlify caches: the Cache-Status header, Netlify-CDN-Cache-Control, the durable cache for functions, tag purges and what each deploy invalidates.

Part of the Top 10 CDNs in 2026 comparison. New to the topic? Start with why cache warming matters.

Caching at a glance

Cache status on the response
Cache-Status (RFC 9211), one entry per cache layer, for example "Netlify Edge"; hit or "Netlify Durable"; fwd=uri-miss; stored=true; ttl=3600.
TTL controls
Netlify-CDN-Cache-Control and CDN-Cache-Control set the CDN TTL separately from the browser; Netlify-Vary controls cache key variations.
Purge
Purge a whole site or specific cache tags (Netlify-Cache-Tag or Cache-Tag) through the purgeCache helper or the API. By default every new deploy invalidates the cache for its deploy context; you can opt out.
Tiering and origin protection
The durable cache, enabled with the durable directive on serverless function responses, stores a response once so other edge nodes reuse it instead of invoking the function again. It has no effect on Edge Functions.
Edge compute
Netlify Functions and Edge Functions.

Strengths for caching

  • Standard Cache-Status header with one entry per layer, including the durable cache.
  • stale-while-revalidate is supported on the CDN headers.
  • Purge by cache tag.

Watch-outs

  • Function and proxy responses are not cached unless you send caching headers.
  • Every deploy invalidates the cache for its deploy context by default, so each deploy is a cold start unless you opt out.
  • stale-if-error and request collapsing are not described in the pages we reviewed.

Cache warming on Netlify

Static assets on Netlify are cached on its edge nodes and invalidated whenever a deploy changes them. Because every deploy invalidates the cache for its context by default, the first visitors after each deploy fill the cache, which is the case cache warming is for.

For function responses, add durable to Netlify-CDN-Cache-Control. A warming request then stores the response in the durable cache, and other edge nodes reuse it instead of invoking the function again.

curl -sI https://example.netlify.app/ | grep -i '^cache-status'
# cache-status: "Netlify Edge"; fwd=miss
# cache-status: "Netlify Edge"; hit

Read the Cache-Status entries in order: the edge entry tells you whether that edge node had the page, and the durable entry tells you whether the shared layer did. The Top 10 CDNs comparison explains the scoring.

Frequently asked questions

Does a Netlify deploy clear the cache?

Yes, by default. All new deploys invalidate the cache for their deploy context. You can opt out so that cached responses survive a deploy.

What is Netlify's durable cache?

A shared cache for serverless function responses. With the durable directive, a response cached for one edge node is also stored centrally so other edge nodes reuse it. It does not apply to Edge Functions.

Netlify documentation

  1. Netlify: Caching overviewhttps://docs.netlify.com/build/caching/caching-overview/
  2. Netlify: Cache APIhttps://docs.netlify.com/build/caching/cache-api/

Warm your cache after every deploy

sitewarm requests the pages in your sitemap after a deploy and reports the cache state the CDN returns for each one, with the vantage point it was measured from.