Subchapter 7.23
references/support-topics/cache-components-suspense-dedupe-pitfall.mdMarkdown1 KBView on GitHub
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.
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.
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.
Name the duplicated call, count, and either: (a) the page-level promise to hoist or (b) the function to move to 'use cache: remote'.