You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[Segment Cache] set fetchStrategy on segments from a dynamic request (#82059)
For non-PPR routes and full prefetches, we fetch multiple segments with one dynamic request. Then, we deconstruct the response into segments and create segment cache entries for them. However, when doing this, we weren't correctly setting the fetch strategy for these cache entries, leaving it at the default (`PPR`).
The most correct way to model this is to simulate the flow that a normal segment prefetch would go through -- we create an empty segment, upgrade it to a pending one (which requires setting `fetchStrategy`) and finally fulfill it.
I've adjusted `fulfillSegmentCacheEntry` to only accept pending segments so that it's not possible to have a fulfilled segment whose fetch strategy wasn't set, like we were doing before.
0 commit comments