megachangelog
Breaking

Vercel CDN no longer caches responses with Vary: Cookie

Vercel CDN has changed its caching behavior to exclude responses with the Vary: Cookie header, as cookies often contain visitor-specific values that create cache entries with poor reuse rates. Users can identify affected responses via the x-vercel-cache header showing MISS and vary_key_denied:cookie in Runtime Logs, and can restore caching by removing Cookie from the Vary header or using Cache-Control: private if the response depends on cookies.

Vercel CDN no longer caches origin responses when includes . VaryCookie

tells a cache which request headers may change the response. Because cookies often contain visitor-specific values, varying by can create many cache entries that are rarely reused. The response is still served normally but isn't stored for future requests.VaryCookie

You can identify these responses by checking the header and . The header is set to , and Logs show as the cache reason.x-vercel-cacheMISSvary_key_denied:cookieRuntime Logs

If Logs show for a route you expect to be cached, check the header returned by your origin:vary_key_denied:cookieVary

Caching behavior for other supported headers is unchanged.Vary

Learn more about and the .high-cardinality headers cache reasonvary_key_denied

Read more

  • If the response is the same regardless of cookies, remove from . Vercel CDN can then cache it if it meets the other caching requirements.CookieVary

  • If the response depends on cookies, keep in and use to prevent personalized responses from being stored in the shared CDN cache.CookieVaryCache-Control: private

cdncachingperformancevary-header

Source: original entry ↗

More from Vercel

Follow Vercel to get its new changes in your feed and email digest.

Feature

OpenAI Decisions API now available on AI Gateway

OpenAI's Decisions API is now accessible through Vercel's AI Gateway with an OpenAI-compatible endpoint, enabling decision models to answer typed questions and return probabilities, choices, and scores for routing, triage, and guardrails use cases. Support is available across the OpenAI SDK, AI SDK, HTTP API, and CLI with the latest versions.

ai-gatewayopenaiapidecisionssdks
Feature

Timestamp attributes now supported in Vercel Flags

Vercel Flags now supports timestamp attributes for entities, allowing you to create time-based targeting rules. Use this feature to run limited-time campaigns, show content between specific dates, or target users based on registration date.

flagstargetingfeaturetimestampscampaigns
Feature

Glyph Cluster now available in stealth on AI Gateway

Glyph Cluster, a reasoning model for coding and long-context analysis, is now available as a stealth model on Vercel's AI Gateway for Pro and Enterprise plan teams with purchased AI Gateway credits at no cost during the stealth period. The model supports function calling, streams responses, and can be accessed via AI SDK, OpenAI-compatible APIs, and coding agents.

ai-gatewaymodelscodingstealth
See all Vercel changes →