Next.js 15 RC with Updated Fetures

Next.js 15 RC with Updated Fetures

The Next.js 15 Release Candidate (RC) is now available. This early version allows you to test the latest features before the upcoming stable release.

  • React: Support for the React 19 RC, React Compiler (Experimental), and hydration error improvements

  • Caching: fetch requests, GET Route Handlers, and client navigations are no longer cached by default

  • Partial Prerendering (Experimental): New Layout and Page config option for incremental adoption

  • next/after (Experimental): New API to execute code after a response has finished streaming

  • create-next-app: Updated design and a new flag to enable Turbopack in local development

  • Bundling external packages (Stable): New config options for App and Pages Router

Try the Next.js 15 RC today:

npm install next@rc react@rc react-dom@rc

Note: You can view the Next.js 15 RC documentation at rc.nextjs.org/docs until Next.js 15 GA.

Caching updates

Next.js App Router launched with opinionated caching defaults. These were designed to provide the most performant option by default with the ability to opt out when required.

Based on your feedback, we re-evaluated our caching heuristics and how they would interact with projects like Partial Prerendering (PPR) and with third party libraries using fetch.

With Next.js 15, we’re changing the caching default for fetch requests, GET Route Handlers, and Client Router Cache from cached by default to uncached by default. If you want to retain the previous behavior, you can continue to opt-into caching.

We're continuing to improve caching in Next.js in the coming months and we'll share more details in the Next.js 15 GA announcement.

fetch Requests are no longer cached by default

Next.js uses the Web fetch API cache option to configure how a server-side fetch request interacts with the framework's persistent HTTP cache:

fetch('https://...', { cache: 'force-cache' | 'no-store' });
  • no-store - fetch a resource from a remote server on every request and do not update the cache

  • force-cache - fetch a resource from the cache (if it exists) or a remote server and update the cache

In Next.js 14, force-cache was used by default if a cache option was not provided, unless a dynamic function or dynamic config option was used.

In Next.js 15, no-store is used by default if a cache option is not provided. This means fetch requests will not be cached by default.

You can still opt into caching fetch requests by:

GET Route Handlers are no longer cached by default

In Next 14, Route Handlers that used the GET HTTP method were cached by default unless they used a dynamic function or dynamic config option. In Next.js 15, GET functions are not cached by default.

You can still opt into caching using a static route config option such as export dynamic = 'force-static'.

Special Route Handlers like sitemap.ts, opengraph-image.tsx, and icon.tsx, and other metadata files remain static by default unless they use dynamic functions or dynamic config options.

Client Router Cache no longer caches Page components by default

In Next.js 14.2.0, we introduced an experimental staleTimes flag to allow custom configuration of the Router Cache.

In Next.js 15, this flag still remains accessible, but we are changing the default behavior to have a staleTime of 0 for Page segments. This means that as you navigate around your app, the client will always reflect the latest data from the Page component(s) that become active as part of the navigation. However, there are still important behaviors that remain unchanged:

  • Shared layout data won't be refetched from the server to continue to support partial rendering.

  • Back/forward navigation will still restore from cache to ensure the browser can restore scroll position.

  • Loading.js will remain cached for 5 minutes (or the value of the staleTimes.static configuration).

You can opt into the previous Client Router Cache behavior by setting the following configuration:

next.config.ts

//next.config.ts
const nextConfig = {
  experimental: {
    staleTimes: { 
     dynamic: 30,
    },
  },
};
 module.exports = nextConfig;