Next.js 15 Makes Caching Opt-In by Default, Fixing Stale Data Risks
Vercel's Next.js 15 and subsequent 16.x releases have reversed the framework's longstanding default caching behavior, which previously cached all fetch() calls aggressively unless developers explicitly disabled it. The old approach caused serious issues in dynamic applications, including cases where users could see stale or mismatched data from other accounts. Under the new model, fetch requests and GET route handlers are uncached by default, meaning live database queries are made on each user request, similar to traditional backend frameworks. Developers who want caching must now explicitly opt in using the 'force-cache' option, prioritizing correctness over performance by default. Alongside this change, APIs for reading cookies, headers, and route parameters inside Server Components are now asynchronous, a shift required to support Partial Prerendering capabilities.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in