Replies: 1 comment
-
|
In Next.js 15, the default behavior changed so that 'fetch' requests and GET Route Handlers are no longer cached by default. In Next.js 14, both were cached automatically unless you explicitly opted out. This change is documented in the Next.js 15 release notes and the updated fetch and Route Handler docs. The shift was made to reduce accidental caching and stale data, and to make data-fetching behavior more explicit and predictable, especially for dynamic and authenticated content. In Next.js 15, you must now explicitly opt in to static caching (for example by forcing static behavior at the route or fetch level), instead of caching happening implicitly documentation for reference: Next.js 15 Release Notes: “Fetch is now uncached by default” |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
In Next.js 15, how has the default caching behavior for fetch requests and Route Handlers changed compared to Next.js 14? Why was this shift made, and how do you now opt-in to static caching?
Beta Was this translation helpful? Give feedback.
All reactions