Request Memoization

Same fetch in One Request Runs Once

Request Memoization

Within a single render, identical fetches automatically dedupe — you can call the same fetch in every component without worry.

3 min read Level 2/5 #nextjs#cache#memoization
What you'll learn
  • Recognize automatic per-request dedupe
  • Call `fetch` in multiple components freely
  • Stop fighting it with manual caching

Request memoization is the smallest of the four Next caches. It lives only for the duration of a single render of the React tree.

What It Does

Two components that call fetch(sameUrl, sameOpts) during the same render only hit the network once. The second call gets the result of the first.

async function Header() {
  const user = await fetch('/api/me').then((r) => r.json())
  return <p>Hello, {user.name}</p>
}

async function Sidebar() {
  const user = await fetch('/api/me').then((r) => r.json())
  return <p>{user.email}</p>
}

export default function Page() {
  return (
    <>
      <Header />
      <Sidebar />
    </>
  )
}

Both components call /api/me. Only one network request fires.

How It Differs From the Data Cache

The Data Cache is shared across requests and users. Request memoization is scoped to a single render — once the response goes out, the memoization table is gone.

This makes it safe even for personalized data: two users’ renders never share memoized entries.

Practical Effect

You can fetch the same data anywhere in the tree without prop-drilling or context. Components stay self-contained, and Next handles the dedupe under the hood.

Cache Tags & revalidateTag →