Skip to content

docs: clarify serverless runtime behavior for use cache#92232

Merged
icyJoseph merged 7 commits into
vercel:canaryfrom
wwenrr:docs/issue-91959-cache-components-serverless-note
Apr 7, 2026
Merged

docs: clarify serverless runtime behavior for use cache#92232
icyJoseph merged 7 commits into
vercel:canaryfrom
wwenrr:docs/issue-91959-cache-components-serverless-note

Conversation

@wwenrr

@wwenrr wwenrr commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add a prominent note in the App Router Caching guide about runtime behavior on serverless deployments
  • clarify that use cache runtime entries are in-memory and may not persist across requests when requests hit different instances
  • link directly to use cache: remote as the durable/shared runtime caching option

Closes #91959

Verification

Notes

  • Formatting toolchain was not run in this environment because pnpm is unavailable on host (pnpm: not found).
  • Change is a minimal docs-only edit (single file, two inserted lines in a callout block).

@nextjs-bot

nextjs-bot commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

Allow CI Workflow Run

  • approve CI run for commit: 016b711

Note: this should only be enabled once the PR is ready to go and can only be enabled by a maintainer

Comment thread packages/next/src/lib/constants.ts Outdated
Comment thread packages/next/src/server/lib/router-utils/setup-dev-bundler.ts Outdated
Comment thread packages/next/src/server/lib/router-utils/setup-dev-bundler.ts Outdated

@icyJoseph icyJoseph left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's remove the other changes, and consider the sign post call out as suggested

Comment thread docs/01-app/01-getting-started/08-caching.mdx
Comment thread docs/01-app/01-getting-started/08-caching.mdx Outdated
@wwenrr

wwenrr commented Apr 2, 2026

Copy link
Copy Markdown
Contributor Author

Addressed ✅

Thanks for the review — I applied the requested scope cleanup and wording updates:

  • Removed the unrelated JS-manifest code changes from this PR.
  • Kept this PR docs-only (docs/01-app/01-getting-started/08-caching.mdx).
  • Replaced the callout text with the suggested “Good to know” phrasing and links.

Current diff is now scoped to the caching docs note only.

Comment thread docs/01-app/01-getting-started/08-caching.mdx Outdated
@wwenrr

wwenrr commented Apr 3, 2026

Copy link
Copy Markdown
Contributor Author

Addressed ✅

Moved the note as requested.

  • Removed the serverless runtime-cache “Good to know” callout from the top section.
  • Repositioned it to the runtime-values area around line 195-196 (right after the CachedContent runtime key explanation), where it fits better contextually.

Latest commit: 016b711b.

Comment thread docs/01-app/01-getting-started/08-caching.mdx Outdated
@icyJoseph icyJoseph merged commit e513488 into vercel:canary Apr 7, 2026
64 checks passed
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Apr 22, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Documentation Related to Next.js' official documentation. locked type: next

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docs: Caching (cacheComponents: true) does not mention that it does not work by default with serverless functions

4 participants