next.js
0c5881a3 - Unify how server responses are written into the client cache (#96876)

Commit
29 days ago
Unify how server responses are written into the client cache (#96876) Every flow that writes a server response into the client cache now goes through a single function, writeServerResponseIntoCache. This is preparation for subsequent steps in this stack that migrate even more callers to this unified path. While we're modifying it, fetchSegmentPrefetchesUsingDynamicRequest is renamed to fetchSegmentPrefetchesUsingRuntimeRequest: these responses are produced by a runtime request, and "dynamic" refers to non-cached data, which prefetch responses never contain. One subtle fix that fell out of the unification: a runtime prefetch response that carries no transport data used to make the flow bail before writing anything; now the shared function rejects the pending entries it was given, the same as a build id mismatch.
Author
Parents
Loading