Cache runtime data for partially static pages on initial load (resume) (#90888)
When a partially static page with `unstable_instant: { prefetch:
'runtime' }` is loaded as initial HTML (PPR resume), the server now
spawns a runtime prerender after the resume render fills the caches,
embedding the result as the `p` field on the `InitialRSCPayload`. The
client extracts this stream during hydration via
`processRuntimePrefetchStream` and writes the data into the segment
cache.
This mirrors the existing navigation path where
`generateStagedDynamicFlightRenderResult` embeds the runtime prefetch
stream in the `NavigationFlightResponse`. Both paths reuse the same
`spawnRuntimePrefetchWithFilledCaches` function (renamed from
`spawnRuntimePrefetchDuringNavigation` since it is no longer specific to
navigations).
Showing
Please
register
or
sign in
to comment