1.3 KiB
| id | title | status | candidateKinds | frameworks | scannerPatterns | priority | citations | maxBriefChars | |||
|---|---|---|---|---|---|---|---|---|---|---|---|
| cache-components-suspense-dedupe-pitfall | Cache Components Suspense dedupe pitfall | active |
|
|
|
87 | 900 |
Investigation Brief
Default 'use cache' does not dedupe identical calls across separate <Suspense> boundaries on the same render. Each boundary re-invokes the cached function, multiplying function-duration and ISR write churn.
Evidence To Check
Confirm the scanner finding's repeated fetch URL or helper name. Verify the call sites are within the same route segment and inside distinct <Suspense> boundaries. Cross-reference fnDurationP95ByRoute and isrWritesByRoute for the owning route.
Do Not Recommend When
Skip if the repeated call is intentional (different parameters, different intent). Skip if the duplicate is in a single component body where in-request memoization already applies.
Verification
Name the duplicated call, count, and either: (a) the page-level promise to hoist or (b) the function to move to 'use cache: remote'.