fix(cache): preserve Cache Components ownership during probing - #3103
Open
james-elicx wants to merge 15 commits into
Open
fix(cache): preserve Cache Components ownership during probing#3103james-elicx wants to merge 15 commits into
james-elicx wants to merge 15 commits into
Conversation
commit: |
This was referenced Aug 26, 2026
Contributor
Performance benchmarksCompared 0 improved · 0 regressed · 6 within ±1.5%
View detailed results and traces 🟢 improvement · 🔴 regression · ⚫ change below 1.5% · paired base/head |
james-elicx
force-pushed
the
codex/cacheability-use-cache-ownership
branch
from
August 26, 2026 18:29
9a0cf75 to
9596fe4
Compare
Contributor
|
james-elicx
force-pushed
the
codex/cacheability-use-cache-ownership
branch
2 times, most recently
from
August 26, 2026 19:42
1259853 to
40e41b5
Compare
james-elicx
force-pushed
the
codex/cacheability-use-cache-ownership
branch
from
August 26, 2026 21:10
40e41b5 to
8dcc672
Compare
james-elicx
force-pushed
the
codex/cacheability-use-cache-ownership
branch
3 times, most recently
from
August 26, 2026 22:05
db7f103 to
92b61ea
Compare
james-elicx
marked this pull request as ready for review
August 26, 2026 22:08
james-elicx
force-pushed
the
codex/cacheability-use-cache-ownership
branch
from
August 26, 2026 22:31
19eaf4c to
dbc198b
Compare
This was referenced Aug 26, 2026
james-elicx
force-pushed
the
codex/cacheability-use-cache-ownership
branch
2 times, most recently
from
August 26, 2026 23:59
64a6c96 to
5374d52
Compare
james-elicx
force-pushed
the
codex/cacheability-use-cache-ownership
branch
from
August 27, 2026 00:43
5374d52 to
f46e5b6
Compare
james-elicx
force-pushed
the
codex/cacheability-use-cache-ownership
branch
4 times, most recently
from
August 27, 2026 01:41
02de876 to
bc44dcc
Compare
james-elicx
force-pushed
the
codex/cacheability-use-cache-ownership
branch
from
August 27, 2026 01:50
bc44dcc to
e2f0558
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Capability stack 5/9. Exact head:
e2f05581bd12c6e0bd96899a068adfd542e82dc2. Base: #3092.Full chain: #3108 → #3090 → #3091 → #3092 → #3103 → #3093 → #3094 → #3098 → #3113.
This supersedes #3095, whose stale descendant base caused GitHub to mark it merged without landing anything on
main.Summary
This aligns staged probes with Next.js Cache Components ownership semantics:
use cacheowns innerfetch(..., { cache: "no-store" }), so that fetch does not demote the enclosing routeuse cache: privatemarks Cache Components routes dynamic and suspends before private user code or cache-key constructiontry/catchor Suspense fallbacks from producing a false static classificationuse cacheorunstable_cache()fails synchronously and cannot persist private outputunstable_cacheentries use a versioned physical namespace, preventing older private output from bypassing the nesting guardio()continues immediately and remains eligible for static probing, matching Next.jsNext.js references
test/e2e/app-dir/use-cache/use-cache.test.tstest/e2e/app-dir/cache-components-errors/use-cache-private.util.tspackages/next/src/server/use-cache/use-cache-wrapper.tspackages/next/src/server/request/io.tsReview guide
prerender-work-unit-setup.tsselects legacy versus Cache Components work-unit ownership.cache-runtime.tsenforces public/private cache nesting.cacheability-classification.tspropagates dynamic ownership to the outer render.cacheability-ownership.spec.tscovers Cache Components and seeded legacy cache entries under built workerd.cacheability-probe.spec.tscovers legacyio()parity.Review size
Layer-only diff against this PR's base: 31 files, +677/-74.
Validation
vp checkandgit diff --check