vercel / vercel/next.js

Docs: following the Auth guide with Partial Prefetching causes extra user lookups on linked pages

Open
#97,940 1 comment 0 reactions 1 assignee View on GitHub

@icyJoseph is already working on this.

Since Aug 28, 2026.

Dominant language
JavaScript
Stars
142k
Forks
32.4k
Avg merge
2d 14h
Merged PRs (30d)
351

Description

What is the documentation issue?

The Authentication with Cache Components guide has you look up the current user on the server (getCurrentUser, including a database read) and wrap that in 'use cache: private' so authenticated pages can be ready before you click.

Opening one page that links to other pages which also call getCurrentUser() fires several server requests, each looking up the user again. I expected one lookup for the page I was on.

'use cache: private' avoids a second session read inside a single request. Prefetched pages are separate requests, so each one fetches the user again.

This showed up with Partial Prefetching (Step 6). Without it, those extra requests mostly don’t happen.

It would help if the docs showed how to follow this pattern without a user lookup per link in the nav.

Is there any context that might help us understand?

Please correct me if Im missing something.

Does the docs page already exist? Please link to it.

https://nextjs.org/docs/app/guides/authentication-with-cache-components

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.