@@ -19,6 +19,7 @@ type AppPageRscCacheKeyBuilder = (
1919 mountedSlotsHeader ?: string | null ,
2020 renderMode ?: AppRscRenderMode ,
2121 interceptionContext ?: string | null ,
22+ interceptionId ?: string | null ,
2223) => string ;
2324type AppPageRequestCacheLife = {
2425 revalidate ?: number ;
@@ -45,6 +46,7 @@ type FinalizeAppPageHtmlCacheResponseOptions = {
4546 isrRscKey : AppPageRscCacheKeyBuilder ;
4647 isrSet : AppPageCacheSetter ;
4748 interceptionContext ?: string | null ;
49+ interceptionId ?: string | null ;
4850 omitPendingDynamicCacheState ?: boolean ;
4951 preserveClientResponseHeaders ?: boolean ;
5052 expireSeconds ?: number ;
@@ -66,6 +68,7 @@ type ScheduleAppPageRscCacheWriteOptions = {
6668 isrRscKey : AppPageRscCacheKeyBuilder ;
6769 isrSet : AppPageCacheSetter ;
6870 interceptionContext ?: string | null ;
71+ interceptionId ?: string | null ;
6972 mountedSlotsHeader ?: string | null ;
7073 omitPendingDynamicCacheState ?: boolean ;
7174 renderMode ?: AppRscRenderMode ;
@@ -85,17 +88,15 @@ function applyPendingDynamicCdnHeaders(
8588 finalizePendingCacheStateHeaders ( headers , options ) ;
8689}
8790
88- function applyMountedSlotRscNoStoreHeaders (
91+ function applyUncacheableRscVariantNoStoreHeaders (
8992 headers : Headers ,
9093 options : { omitCacheState ?: boolean } = { } ,
9194) : void {
9295 // Mounted-slot RSC payloads deliberately bypass the slot-blind persistent
93- // cache. Make that same bypass explicit to every CDN adapter: an edge-managed
94- // adapter may intentionally cache pending-dynamic responses, so the generic
95- // pendingDynamicCheck signal is not strong enough for this variant.
96- // This branch additionally forces no-store because mounted variants have no
97- // persistent admission path at all. The active adapter clears any stale
98- // provider-specific headers that it owns.
96+ // cache. Make that same bypass explicit to
97+ // every CDN adapter: an edge-managed adapter may intentionally cache
98+ // pending-dynamic responses, so that generic signal is not strong enough.
99+ // The active adapter clears any stale provider-specific headers that it owns.
99100 applyCdnResponseHeaders ( headers , { cacheControl : NO_STORE_CACHE_CONTROL } ) ;
100101 // Dynamic and draft responses intentionally have no cache state. Do not
101102 // manufacture a MISS solely because the request carried mounted slots.
@@ -169,6 +170,7 @@ export function finalizeAppPageHtmlCacheResponse(
169170 null ,
170171 undefined ,
171172 options . interceptionContext ,
173+ options . interceptionId ,
172174 ) ;
173175 const clientHeaders = new Headers ( response . headers ) ;
174176 if ( options . preserveClientResponseHeaders !== true ) {
@@ -266,14 +268,14 @@ export function finalizeAppPageRscCacheResponse(
266268 // slots because edge-managed adapters may cache pending-dynamic responses.
267269 scheduleAppPageRscCacheWrite ( options ) ;
268270
269- const isMountedSlotVariant = Boolean ( options . mountedSlotsHeader ) ;
270- if ( options . preserveClientResponseHeaders === true && ! isMountedSlotVariant ) {
271+ const isUncacheableVariant = Boolean ( options . mountedSlotsHeader ) ;
272+ if ( options . preserveClientResponseHeaders === true && ! isUncacheableVariant ) {
271273 return response ;
272274 }
273275
274276 const clientHeaders = new Headers ( response . headers ) ;
275- if ( isMountedSlotVariant ) {
276- applyMountedSlotRscNoStoreHeaders ( clientHeaders , {
277+ if ( isUncacheableVariant ) {
278+ applyUncacheableRscVariantNoStoreHeaders ( clientHeaders , {
277279 omitCacheState : options . omitPendingDynamicCacheState === true ,
278280 } ) ;
279281 } else {
@@ -302,6 +304,7 @@ export function scheduleAppPageRscCacheWrite(
302304 null ,
303305 options . renderMode ,
304306 options . interceptionContext ,
307+ options . interceptionId ,
305308 ) ;
306309 const cachePromise = ( async ( ) => {
307310 try {
0 commit comments