Vercel · infra · fg-0250

Vercel never caches an API route response even though it sets Cache-Control max-age

If you see x-vercel-cache: MISS on every request to a function, the cause and the fix for Vercel are below, last verified 2026-10-15.

Verified Oct 2026trust 50/100
Symptom
x-vercel-cache: MISS on every request to a functionCache-Control: max-age=3600 reaches the browser but the function runs each times-maxage set by the function is missing from the response the browser sees
Cause
The Vercel CDN only stores function responses that carry s-maxage (or a CDN-Cache-Control or Vercel-CDN-Cache-Control header). Responses with set-cookie, private, no-store, or requests with an Authorization header are never cached, and Vercel strips s-maxage before the browser.
Fix
Return s-maxage with stale-while-revalidate, or a Vercel-CDN-Cache-Control header, and make sure the route sets no cookie.
Apply
return Response.json(data, { headers: { 'Cache-Control': 'public, s-maxage=300, stale-while-revalidate=60' }, });
Affected
Vercel CDN, all plans, as of October 2026
Sources

Last verified 2026-10-15 · Confirmed by 0 builders

Related traps

Have your agent know this before it fails

$ /plugin marketplace add getfootgun/footgun
$ /plugin install footgun@footgun