Skip to content

fix(cache): preserve Cache Components ownership during probing - #3095

Merged
james-elicx merged 0 commit into
codex/cacheability-cache-certificationfrom
codex/cacheability-use-cache-ownership
Aug 26, 2026
Merged

fix(cache): preserve Cache Components ownership during probing#3095
james-elicx merged 0 commit into
codex/cacheability-cache-certificationfrom
codex/cacheability-use-cache-ownership

Conversation

@james-elicx

@james-elicx james-elicx commented Aug 26, 2026

Copy link
Copy Markdown
Member

Stacked on #3094.

What this fixes

This follow-up aligns staged cacheability probes with Next.js Cache Components ownership semantics:

  • a public use cache boundary owns an inner fetch(..., { cache: "no-store" }), so that fetch does not demote the enclosing route
  • use cache: private marks the route dynamic and suspends before private user code or cache-key construction
  • the outer prerender owns that suspension, so user try/catch and Suspense fallbacks cannot turn it into a static certification
  • use cache: private inside public use cache or unstable_cache() fails synchronously, matching Next.js, and cannot persist private output in the outer shared cache
  • a genuine application 5xx remains a probe failure rather than being hidden by earlier dynamic usage
  • the ordinary App Router request path avoids probe-only ownership allocation

The unsafe legacy-payload upgrade and bounded-fill coordinator have been split into #3099 and #3100. They are not part of this diff.

Next.js parity

The workerd E2E ports the relevant ownership and invalid-nesting behavior from:

@pkg-pr-new

pkg-pr-new Bot commented Aug 26, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@vinext/cloudflare@3095
npm i https://pkg.pr.new/create-vinext-app@3095
npm i https://pkg.pr.new/@vinext/types@3095
npm i https://pkg.pr.new/vinext@3095

commit: ad26419

@github-actions

github-actions Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Performance benchmarks

Compared ad26419 against base 9a08dfc using alternating same-runner rounds. Next.js was unchanged and skipped.

0 improved · 0 regressed · 6 within ±1.5%

Scenario Framework Baseline Current Change
Client bundle size (gzip) vinext 142.3 KB 142.3 KB ⚫ +0.0%
Client entry size (gzip) vinext 129.6 KB 129.6 KB ⚫ +0.0%
Dev server cold start vinext 3.08 s 3.13 s ⚫ +1.4%
Production build time vinext 3.43 s 3.42 s ⚫ -0.2%
RSC entry closure size (gzip) vinext 117.5 KB 117.7 KB ⚫ +0.2%
Server bundle size (gzip) vinext 199.2 KB 199.5 KB ⚫ +0.1%

View detailed results and traces

🟢 improvement · 🔴 regression · ⚫ change below 1.5% · paired base/head

@james-elicx
james-elicx force-pushed the codex/cacheability-use-cache-ownership branch from 741682a to 1296ef0 Compare August 26, 2026 12:12
@github-actions

Copy link
Copy Markdown
Contributor
Example Preview Production Original
app-router-cloudflare preview production
pages-router-cloudflare preview production
app-router-playground preview production original
realworld-api-rest preview production
nextra-docs-template preview production
benchmarks preview production
hackernews preview production original
workers-cache preview production
web preview production

@james-elicx

Copy link
Copy Markdown
Member Author

/bigbonk review for issues

2 similar comments
@james-elicx

Copy link
Copy Markdown
Member Author

/bigbonk review for issues

@james-elicx

Copy link
Copy Markdown
Member Author

/bigbonk review for issues

@ask-bonk

ask-bonk Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

@james-elicx Bonk workflow was cancelled.

View workflow run · To retry, trigger Bonk again.

@james-elicx

Copy link
Copy Markdown
Member Author

/bigbonk review for issues

@james-elicx

Copy link
Copy Markdown
Member Author

/bigbonk review for issues

Hard time limit: 20 minutes. Return all findings available before the deadline; do not wait indefinitely for additional analysis.

@james-elicx

Copy link
Copy Markdown
Member Author

/bigbonk review for issues

Hard time limit: 20 minutes. Review exact head 6291704 and return all findings available before the deadline; do not wait indefinitely for additional analysis.

@james-elicx

Copy link
Copy Markdown
Member Author

/bigbonk review for issues

Hard time limit: 20 minutes. Review exact head 7f4001a and return all findings available before the deadline; do not wait indefinitely.

@james-elicx

Copy link
Copy Markdown
Member Author

/bigbonk review for issues

Hard time limit: 20 minutes. Review exact head 7f4001a and return every finding available before the deadline. If the full review cannot finish, post the partial verdict instead of waiting or cancelling without a result.

@james-elicx
james-elicx force-pushed the codex/cacheability-use-cache-ownership branch from 7f4001a to ad26419 Compare August 26, 2026 14:45
@james-elicx
james-elicx force-pushed the codex/cacheability-use-cache-ownership branch from ad26419 to 43dd408 Compare August 26, 2026 15:38
@james-elicx
james-elicx force-pushed the codex/cacheability-use-cache-ownership branch from 43dd408 to bbc2b0f Compare August 26, 2026 17:47
@james-elicx
james-elicx merged commit 9a0cf75 into codex/cacheability-cache-certification Aug 26, 2026
@james-elicx
james-elicx deleted the codex/cacheability-use-cache-ownership branch August 26, 2026 18:01
@james-elicx
james-elicx restored the codex/cacheability-use-cache-ownership branch August 26, 2026 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant