fix(cache): bypass shared lookup for force-dynamic routes - #3346
Conversation
@vinext/cloudflare
create-vinext-app
@vinext/types
vinext
@cloudflare/workers-response-store
commit: |
Performance benchmarksCompared 0 improved · 0 regressed · 6 within ±1.5%
View detailed results and traces 🟢 improvement · 🔴 regression · ⚫ change below 1.5% · paired base/head |
|
|
/bigbonk review for issues Time limit: 8 minutes. Complete the review and post all findings within that limit. |
| : [ | ||
| ...route.layouts, | ||
| route.pagePath, | ||
| ...route.parallelSlots.flatMap((slot) => [ |
There was a problem hiding this comment.
[P1] Include intercepting branches in force-dynamic classification\n\nThis scans the normal page/layout and parallel-slot branches, but it never scans route.siblingIntercepts or each slot’s interceptingRoutes (pagePath plus layoutPaths). If the canonical /photos/[id] page is static while an intercepting modal for that route exports dynamic = "force-dynamic", the generated route remains forceDynamic: false; an intercepted request therefore still consults the shared Response Store/Workers Cache before the runtime segment config can veto admission. Please classify the intercept branch as well (conservatively at route level, or carry branch-specific metadata) and cover that case.
There was a problem hiding this comment.
Fixed in 5d8661c. The build-time classifier now includes each slot intercept and sibling intercept page plus its layout chain, with regression coverage for both shapes. This follows Next.js applying segment dynamic config while recursively constructing the selected branch: https://github.com/vercel/next.js/blob/c20c1d4125b5a3548207a17619837ae590fc187b/packages/next/src/server/app-render/create-component-tree.tsx#L303-L338
|
Posted 1 actionable inline finding. |
|
/bigbonk review for issues Time limit: 8 minutes. Complete the review and post all findings within that limit. |
|
LGTM! |
Summary
Testing