Vercel CDN no longer caches responses with Vary: Cookie

Vercel CDN no longer caches origin responses when the Vary header includes Cookie to prevent high cardinality cache bloat. Responses are served normally without being stored in the shared cache, and developers can identify these events using runtime logs and specific headers.

Cover image for Vercel CDN no longer caches responses with Vary: Cookie

Vercel’s CDN has been updated so that it no longer stores origin responses whose Vary header lists Cookie. The change prevents the cache from creating an excessive number of entries that are unlikely to be reused. Requests for such responses are still fulfilled, but the result is not written to the shared cache. When a response varies by Cookie, each distinct cookie value can generate a separate cache key, leading to high‑cardinality cache bloat. By treating these cases as cache misses, Vercel reduces storage pressure and improves overall cache efficiency. Developers can see the effect through the x-vercel-cache response header, which will be set to MISS, and through runtime logs that record the reason vary_key_denied:cookie. It remains uncertain how many existing routes will be impacted until developers examine their own Vary headers. If a response is identical regardless of cookies, removing Cookie from Vary could restore caching, but the guidance relies on the developer’s assessment of response behavior. The handling of other supported Vary headers continues unchanged, though the exact performance impact of this specific adjustment has not been quantified.