Does Next.js `fetch` Cache by Default? Next.js 14 vs 15 vs 16

Next.js 14 cached fetch by default, Next.js 15 stopped, and Next.js 16 keeps it uncached. Learn the per-version default and how to opt in.

6 min read

Next.js 16 does not cache fetch by default, and neither did Next.js 15. Next.js 14 was the last version that cached fetch requests out of the box. Which default you get depends on the version and the caching model.

Versionfetch cached by defaultHow to control it
Next.js 14YesTune with next.revalidate
Next.js 15Nocache: force-cache
Next.js 16, previous modelNocache: force-cache
Next.js 16, Cache ComponentsNouse cache + cacheLife

Next.js 14

In Next.js 14 a fetch request was cached by default. The framework stored the response and reused it, and you controlled freshness with the next.revalidate option or route segment config.

This made static data easy, but it also surprised developers whose pages kept showing stale data because they never opted out. A route stayed static until it used a no-store request or a dynamic API, which pushed it to render on demand. If you did nothing, the cached copy could live indefinitely.

Next.js 15

Next.js 15 changed the default so fetch requests are no longer cached. To cache one, pass cache: 'force-cache':

App.tsxApp.tsx
// app/page.tsx
export default async function Page() {
  const data = await fetch('https://api.example.com/posts', {
    cache: 'force-cache',
  })
  const posts = await data.json()
  return <ul>{posts.map((post) => <li key={post.id}>{post.title}</li>)}</ul>
}

The opposite option, cache: 'no-store', forces a fresh request every time. To cache every fetch in a segment without editing each call, export fetchCache with the default-cache value. GET Route Handlers followed the same change and are no longer cached by default either.

Next.js 16

Next.js 16 keeps fetch uncached by default in the previous model, where force-cache and segment configs still work. For that model, see caching without Cache Components.

With Cache Components enabled, data fetching is dynamic by default and you cache with the directive instead:

typescripttypescript
// app/lib/posts.ts
import { cacheLife } from 'next/cache'
 
export async function getPosts() {
  'use cache'
  cacheLife('hours')
  const res = await fetch('https://api.example.com/posts')
  return res.json()
}

This runs on the server and joins the static shell, unlike a force-cache fetch which only fills the framework's fetch cache. The whole function result is what gets cached, not just the fetch call. For the full option set, see using fetch in Next.js.

How to tell which model you are on

Open next.config.ts. If it contains cacheComponents set to true, you are on Cache Components. Otherwise you are on the previous model, where fetch, segment configs, and unstable_cache define caching.

The answer to "does fetch cache" is no in both models, but the way you opt in differs, so name the model before you make a caching claim.

Rune AI

Rune AI

Key Insights

  • Next.js 14 cached fetch by default.
  • Next.js 15 made fetch uncached by default.
  • Next.js 16 keeps fetch uncached in the previous model.
  • Cache Components makes data dynamic and caches via use cache.
  • Always check the model your project is running.
RunePowered by Rune AI

Frequently Asked Questions

Did Next.js 15 stop caching fetch by default?

Yes. Next.js 15 changed fetch requests to be uncached by default, so you opt in with cache: 'force-cache'.

Does fetch cache by default with Cache Components enabled?

No. Under Cache Components, data fetching is dynamic by default and you cache deliberately with the use cache directive.

Conclusion

The default flipped in Next.js 15 and stayed uncached in 16. In the previous model you opt in with cache: 'force-cache', and under Cache Components you use the use cache directive with a cacheLife lifetime.