HomeBlogNext.js 15 to 16: Caching & Cache Components

Next.js 15 to 16: Caching & Cache Components

Next.js 15 changed async request APIs and caching defaults, 16 enforces them, and Cache Components takes over. Verified against official release notes.

DevKit is maintained by hcatree. I wrote the tools on this site and ran the compression benchmarks myself — the script and the raw data download from the benchmarks page.

2026-11-1116 min

Let's fix the time coordinates first, because they determine how every change below should be read.

As of November 2026, npm lists next latest as 16.4.6 (published 2026-11-09) and canary as 16.5.0-canary.47, while the 15 line is still receiving patches — the backport tag points at 15.5.29, published 2026-11-03, eight days ago. So Next.js 15 is not an obsolete release; it is a still-maintained transitional shape whose direction has already been taken over by 16.

That creates a very practical question: of the changes 15 introduced, which ones became today's foundation, and which ones were overwritten? Mixing the two together is how people end up writing 14-era caching code on top of 16.

The short version

Where you are What to do
14.x or older Don't stop at 15. 15's sync APIs are only the warning period; 16 turns them into build failures. Jumping straight to 16.4 costs less.
15.0 – 15.4 At minimum move to 15.5.x. Only 15.5 still receives security and maintenance patches; the other minor dist-tags are frozen.
15.5.x Put 16.4 on this quarter's plan. Every implicit cache you rely on becomes explicit rewrite work before 17.
16.0 – 16.3 Upgrade to 16.4, then enable cacheComponents + partialPrefetching. Before 16.4 the team did not recommend it universally; now it does.
New project on 16.4 Already on by default for create-next-app. Nothing to configure.

1. The version map: four steps for one caching model

Next.js caching model evolution: 13.4 to 17

Laid out chronologically from the official release posts, 15's position becomes obvious:

Version Released Rendering and caching position
13.0.0 2022-10-25 App Router first available, built on React Server Components and Suspense
13.4.0 2023-05-04 App Router marked stable; Turbopack moves to beta; Server Actions still alpha
14.0.0 2023-10-26 App Router becomes the default for new projects; implicit caching (cached fetch, cached GET handlers) is the norm of this generation
15.0.0 2024-10-21 Request APIs go async; GET Route Handlers and client navigations stop being cached by default; Turbopack dev becomes stable
16.0.0 2025-10-22 Cache Components and "use cache"; Turbopack becomes the default bundler; middleware.ts renamed proxy.ts; sync request APIs removed
16.4.0 2026-10-06 Cache Components officially declared the best choice for every Next.js app, enabled by default in new create-next-app projects, and stated to become the default in Next.js 17

The npm registry data says more about maintenance windows than any migration slogan:

dist-tag Version Meaning
latest 16.4.6 Main line; the 16.4 series has already shipped 7 releases (16.4.0 – 16.4.6)
canary 16.5.0-canary.47 Next release candidate
backport 15.5.29 The only still-active 15 minor line, with 29 releases (15.5.0 – 15.5.29)
next-15-3 15.3.9 Frozen
next-15-2 15.2.9 Frozen
next-15-0 15.1.12 Frozen
next-14 14.2.35 Last 14 publish was 2025-12-11; nothing since

Staying on 15 is defensible — but you have exactly one maintenance line. Staying on 14 means no patches for over half a year.

2. Change one: async request APIs (proposed in 15, enforced in 16)

This was 15's widest breaking change, and the one most often misread as "the API signatures changed".

What the team actually said

The 15 post is explicit: in traditional SSR the server waits for a request before rendering anything, but not all components depend on request-specific data, so it's unnecessary to wait. Ideally the server prepares as much as possible before a request arrives — and to do that, the framework has to know when to wait for the request. The await is that wait point.

In other words, async-ification is not cosmetic. It is the precondition for PPR and, later, Cache Components: only when reading request data is an explicit await can the compiler split rendering into "can be prerendered ahead of time" and "must run at request time".

The affected surface

The list 15 published (kept intact by 16, which just converts warnings into errors):

  • cookies()
  • headers()
  • draftMode()
  • params — in layout.js, page.js, route.js, default.js, generateMetadata, generateViewport
  • searchParams — in page.js
// Next.js 14: synchronous
import { cookies } from 'next/headers';

export function AdminPanel() {
  const token = cookies().get('token');
}

// Next.js 15: async is the new form, sync still runs but warns in dev and production
export async function AdminPanel() {
  const cookieStore = await cookies();
  const token = cookieStore.get('token');
}

// Next.js 16: sync access is gone, await is mandatory

16's removals table has the matching two rows — Sync params, searchParams props access and Sync cookies(), headers(), draftMode() access, both marked "Must use async". Metadata image route params also became async, and the id from generateImageMetadata is now Promise<string>.

There is a codemod for the mechanical part:

npx @next/codemod@canary next-async-request-api .

What async-ification actually buys you

The 16.4 post contains a snippet worth isolating. It shows how to ship the page shell before params resolves:

export default function Page({ params }) {
  return (
    <Suspense fallback={<Spinner />}>
      {params.then(({ id }) => (
        <Message id={id} />
      ))}
    </Suspense>
  );
}

params is a thenable here; putting the result of .then() inside Suspense lets the route shell stream out first and render the interior once the parameter is known. This is the payoff of the async model: waiting is downgraded to a local fallback instead of blocking the whole document. If your migration stopped at "added the awaits", you haven't collected the return on the work yet.

Three traps

  1. export const dynamic = 'force-dynamic' does not make sync access legal. It controls rendering strategy, not API shape.
  2. A missing await inside generateMetadata is a warning in 15 and a build failure in 16 — and this is exactly the function where people casually "just read a header", so it's the most common miss in audits.
  3. Passing params straight into a Client Component. The child receives a Promise with no await semantics available; resolve it to a value at the server boundary first.

3. Change two: the caching defaults (this is the main story)

Section 15 heads this "Caching Semantics (Breaking)" and its summary line is blunt: fetch requests, GET Route Handlers and client navigations are no longer cached by default. The stated reason is a re-evaluation of the caching heuristics and how they interact with Partial Prerendering and with third-party libraries that use fetch.

The two mechanisms 15 spells out in detail are the ones that land in your code.

3.1 GET Route Handlers are no longer cached by default

In 14, a Route Handler exporting GET was cached unless it used a dynamic function or dynamic config option. 15 inverts it: not cached by default.

// app/api/articles/route.ts
// Opt back in explicitly
export const dynamic = 'force-static';

export async function GET() {
  return Response.json({ ok: true });
}

One easily missed exception: metadata routes such as sitemap.ts, opengraph-image.tsx and icon.tsx remain static by default unless they use dynamic functions or dynamic config. That distinction matters for static sites — SEO endpoints should not start running per request just because your business routes do.

3.2 Page segments drop to staleTime 0 in the client Router Cache

staleTimes existed as an experimental flag since 14.2, but 15 changed the default behaviour: a staleTime of 0 for Page segments. Navigate somewhere and the client always reflects the latest data from the Page components that become active.

The post also pins down three behaviours that did not change, which is why zeroing the default doesn't wreck UX:

  • Shared layout data is not refetched from the server, preserving partial rendering;
  • Back/forward navigation still restores from cache, so the browser can restore scroll position;
  • loading.js remains cached for 5 minutes (or the value of staleTimes.static).

To go back to the 14 behaviour:

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

export default nextConfig;

A follow-up worth knowing: 16.1 fixed staleTimes.static not consistently enforcing the 30-second minimum, and the same release removed the clientSegmentCache flag entirely. Any configuration advice you find online mentioning that flag is stale.

3.3 The rest of 15's caching changes

These hide in the "Other Changes" list but all change production behaviour:

  • force-dynamic now sets a no-store default on the fetch cache (PR #64145);
  • calling revalidateTag / revalidatePath during render throws (PR #71093);
  • self-hosting: expireTime graduates from experimental.swrDelta with the default raised to one year, so most CDNs can fully apply stale-while-revalidate semantics, and Next.js no longer overrides your custom Cache-Control values with its defaults;
  • sharp is used automatically under next start and standalone output — no manual install;
  • the cache handler can be specified via NEXT_CACHE_HANDLER_PATH.

The one-year expireTime default is significant for self-hosted + CDN setups: the stale-while-revalidate window returned for ISR pages gets much longer, so a CDN can serve old content for longer when revalidation fails. That is an availability-first trade-off, and it deserves a "content staleness" metric in your monitoring.

3.4 16 finishes the job: Cache Components

15 removed the two most complained-about implicit caches. 16 removes the whole implicit model.

// next.config.ts
const nextConfig = {
  cacheComponents: true,
  partialPrefetching: true, // as of 16.4 the team considers this part of the model
};

With it on, all dynamic code in any page, layout or API route executes at request time by default, and caching is entirely opt-in. The centerpiece is the "use cache" directive, which the official analogy describes as a component-level version of the Cache-Control HTTP header:

import { cacheLife } from 'next/cache';

async function Projects({ userId }) {
  'use cache';
  cacheLife('hours');

  const projects = await db.query.projects.findMany({
    where: eq(projectsTable.userId, userId),
  });

  return (/* ... */);
}

Next.js interprets these annotations while rendering, caching the component's UI in the browser during client navigations and, optionally, on the server during rendering or ahead of time at build. It replaces the implicit caching behaviours of previous App Router versions.

Two related semantics deserve special attention because 15 had no equivalent:

revalidateTag() now requires a second argument, a cacheLife profile:

import { revalidateTag } from 'next/cache';

revalidateTag('blog-posts', 'max');      // recommended for most cases
revalidateTag('news-feed', 'hours');
revalidateTag('analytics', 'days');
revalidateTag('products', { expire: 3600 });

revalidateTag('blog-posts');             // single-argument form is deprecated in 16

updateTag() and refresh() are new, and Server Actions only:

'use server';
import { updateTag } from 'next/cache';

export async function updateUserProfile(userId: string, profile: Profile) {
  await db.users.update(userId, profile);
  updateTag(`user-${userId}`);   // read-your-writes: expire and immediately read fresh
}
'use server';
import { refresh } from 'next/cache';

export async function markNotificationAsRead(id: string) {
  await db.notifications.markAsRead(id);
  refresh();  // touches no cache; refreshes uncached data, complements client router.refresh()
}

The split across these three functions is the first time Next.js wrote consistency expectations into API names: revalidateTag(tag, profile) means "stale is fine, revalidate in the background"; updateTag() means "after my write I must see my own data"; refresh() means "this was never cached, it just needs re-reading". 16.2 also fixed a detail: revalidateTag with a profile should not trigger client cache invalidation.

3.5 16.4 closes the loop: static becomes a build-time contract

16.4 is the end point of this arc because it addresses the real gap left by 15 and 16.0: one accidental dynamic component can destroy the performance and cost guarantees of an otherwise optimized route.

// app/blog/[slug]/page.tsx
export const ensureStatic = 'navigation';

export default function Page() {
  return (
    <>
      <UserAvatar />   {/* build fails: this introduces request-time rendering */}
      <Content />
    </>
  );
}

ensureStatic has three levels: 'navigation' is strictest and fails the build if any dynamic content appears; 'prefetch' guarantees that explicit prefetch links only fetch static content; 'shell' guarantees that only static content is fetched when the route is first discovered. It works on a page or on a layout for batch guarantees — put ensureStatic = 'navigation' on the root layout and you have declared that every page navigation on the site is static.

Two additional APIs defer cached content to a later stage:

import { navigation } from 'next/cache';

async function Thread({ id }) {
  await navigation();               // skipped during prefetch, rendered on real navigation
  const thread = await getThread(id);
  // ...
}

navigation() excludes cached content from a prefetch; prefetch() excludes it from a route's shell, deferring it until an explicit <Link prefetch> or useRouter().prefetch(). This is the answer to "adding prefetch loaded the entire message thread for every visible link".

4. Change three: toolchain and runtime (started in 15, finished in 16)

Capability Next.js 15 Next.js 16 / 16.4
Turbopack next dev --turbo stable (published figures: up to 76.7% faster local startup, 96.3% faster Fast Refresh, 45.8% faster initial route compile) Default bundler (2–5× faster production builds, up to 10× faster Fast Refresh), fall back with next build --webpack; 16.4 cuts disk cache size 20–25% via Zstandard, ships one shared runtime chunk, shortens production CSS Module names, adds export mangling and lazy server HMR
Request interception middleware.ts Renamed proxy.ts, exported function renamed proxy, runs on the Node.js runtime; middleware.ts still works for Edge cases but is deprecated
Config file next.config.ts supported 16.4 adds --experimental-next-config-strip-types to run it through Node's native TypeScript
Linting ESLint 9 support (8 still works) next lint removed, next build no longer lints; use ESLint/Biome directly, codemod next-lint-to-eslint-cli; @next/eslint-plugin-next defaults to flat config
Server Action security Unguessable, non-deterministic action IDs recalculated between builds; unused actions eliminated at build Carried forward
External package bundling serverExternalPackages stabilized (was serverComponentsExternalPackages); Pages Router gains bundlePagesRouterDependencies Carried forward
Lifecycle observability instrumentation.js stable, experimental.instrumentationHook removable; onRequestError designed with Sentry Carried forward
Forms next/form: prefetches layout/loading in view, client-side navigation, progressive enhancement Carried forward, stronger under 16's rewritten prefetch system
Post-response work unstable_after (experimental.after) Re-check this experimental flag's status on your target version; don't assume it stabilized
Removed — All AMP APIs and config, serverRuntimeConfig/publicRuntimeConfig, unstable_rootParams(), several devIndicators options; parallel routes now fail the build without default.js
Runtime floor Node.js 18.18.0 Node.js 20.9+, TypeScript 5.1+, Chrome/Edge/Firefox 111+, Safari 16.4+
React Aligned with React 19 (App Router on 19 RC, Pages Router could stay on React 18) 16 runs on the React canary channel, carrying React 19.2's View Transitions, useEffectEvent and Activity; 16.4 ships React 19.3

next/image default changes also cluster in 16, and each one silently alters production behaviour: minimumCacheTTL moves from 60s to 4 hours; size 16 is dropped from default imageSizes (used by 4.2% of projects); qualities narrows from [1..100] to [75], with quality coerced to the nearest allowed value; maximumRedirects goes from unlimited to 3; dangerouslyAllowLocalIP blocks local-IP optimization by default; local src with query strings now needs images.localPatterns to prevent enumeration attacks. On the 15 side: squoosh removed in favor of optional sharp, Content-Disposition default becomes attachment, and leading/trailing spaces in src error out.

Reading that table should leave you with one conclusion: 15 was a semantics correction; 16 is a model replacement. The first you can absorb almost painlessly. The second needs a scheduled project.

5. Migration in practice: the order for 15.x → 16.4

Sequence matters more than checklists. The classic mistake is upgrading all the way in one command and then facing bundler, proxy and caching failures simultaneously.

  1. Check the gates first: node -v ≥ 20.9 (Node 18 unsupported from 16), npx tsc -v ≥ 5.1.
  2. Automated upgrade: npx @next/codemod@canary upgrade latest. The team explicitly recommends the canary tag for the codemod even when targeting a stable Next.js, because the tooling itself keeps improving.
  3. Upgrade the framework only; leave cacheComponents off. The goal is a green build through the Turbopack, proxy and removals layer first.
  4. Clear sync request APIs: run the next-async-request-api codemod, then grep for cookies(), headers(), draftMode(), params, searchParams to catch the rest. Audit generateMetadata hardest.
  5. middleware.ts → proxy.ts: rename the file and the exported function; logic stays. But it now runs on Node.js, so anything relying on Edge-specific behavior needs re-evaluation.
  6. Add default.js to every parallel route slot: missing files fail the 16 build. Equivalent behavior is calling notFound() or returning null.
  7. Audit every revalidateTag call: add the second argument, 'max' for most content; switch form submissions that need read-your-writes to updateTag(); use refresh() for uncached header data such as notification counts.
  8. Move linting: npx @next/codemod@canary next-lint-to-eslint-cli ., and add an explicit lint step to CI — next build no longer does this for you.
  9. Re-review next/image: replace domains with remotePatterns; if you rely on quality tuning, remember the default qualities is only [75].
  10. Only now enable cacheComponents: true + partialPrefetching: true, converting each formerly implicit cache point into 'use cache' + cacheLife(...), and lock purely static routes with ensureStatic.
  11. Roll out gradually and watch prefetch: the team names the trade-off itself — after the routing rewrite you may see more individual prefetch requests but much lower total transfer size. Watch both curves, not one.

If you want 16.4's agent tooling, step 2 becomes:

npx next@canary upgrade --agent=latest

It checks your installed version, selects a target release, and prepares version-specific migration guides, the codemods needed and verification steps for the agent to execute. Paired with experimental.agentUpgrade (default policy 'security', which only nudges about known vulnerabilities affecting your installed version; 'latest' or false also available) the framework can proactively prompt for upgrades. Know the boundaries though: experimental.agentFeedback requires telemetry enabled and does not run in CI — how much upgrade authority your agent gets is a team policy decision, not a framework default.

6. My reads

First, 15's historical significance is not the APIs, it is the direction of the defaults. It moved App Router from "we cache for you" to "we don't, and you declare it". 16.4 already states the next sentence: Cache Components becomes the default in 17. So the judgement is hard-edged — the cost of staying on 15 isn't missing features, it's that every implicit cache you depend on must be rewritten explicitly before 17. The size of that debt is proportional to how much fetch and Route Handler caching your code relies on.

Second, splitting the cache APIs by consistency semantics is the most borrowable design decision in this whole arc. revalidateTag / updateTag / refresh map to "eventual consistency is fine", "read-your-writes required" and "never cached, just re-read". Frontend frameworks have historically crammed all three into one revalidate, which produces either needless waiting or stale reads. These names could become common vocabulary in RSC ecosystems the way HTTP Cache-Control became universal.

Third, ensureStatic is the feature I'm most bullish on. It moves "this route must not contain request-time rendering" from operational observation to build-time failure. For content sites, marketing pages and commerce, that puts the bill and the SEO profile into CI. Together with experimental.strictRouteTypes (added in 16.2) it shows a consistent ambition: shift as many runtime-only problems as possible into compile time.

Fourth, the webpack escape hatch won't stay open long. Turbopack went from 13.4 beta (2023-05) to default bundler in 16 (2025-10) in two and a half years. next build --webpack still exists, but by Next.js's usual deprecation cadence, custom webpack loader migrations should be scheduled now rather than after the build stops working — plausibly leaving 17 as the last window.

Fifth, and honestly: the caching story changed position three times in a year. 16.0 said Cache Components had arrived; 16.4 said "prior to this release, we didn't recommend it universally because there were some cases where it couldn't achieve the same cost and performance guarantees as with the previous model" — and now recommends it everywhere. Saying that out loud is responsible, but for teams who invested early it means real rework, especially since cacheComponents and the old implicit caching are mutually exclusive. Hence my concrete advice: adopt it immediately for new projects; for existing ones treat it as its own scheduled refactor, not a flag to flip.

7. Decision reference

Situation Recommendation
New project / content site 16.4 + cacheComponents + partialPrefetching, with ensureStatic = 'navigation' on purely static routes
Legacy app, Pages Router dominant Staying on 15.5.x for patches is reasonable, but schedule 16; the 14 line has no patches anymore
Heavy reliance on implicit fetch caching Upgrade to 16 but don't enable cacheComponents yet; audit tag usage first, then flip
Self-hosted behind a CDN Re-examine the 15 expireTime one-year default and the 16 images.minimumCacheTTL 4-hour default against your origin traffic and hit rate
Users must see their own writes updateTag() inside a Server Action, not single-argument revalidateTag()
Want type errors at compile time Enable experimental.strictRouteTypes on 16.2+
CI depended on next lint Move to the ESLint CLI or Biome now; nothing replaces it inside next build

References:

Discuss this articleEchoForum · no sign-up, replies in any language