next.js
4dad02d1 - [dynamicIO] abort warmup after caches are complete (#72474)

Commit
1 year ago
[dynamicIO] abort warmup after caches are complete (#72474) When we warmup we are trying to fill caches so the actual dev dynamic render can have the right environment for logs to help with debugging. If we have no inflight cache reads/fills happening there is no reason to continue the warmup. This change updates the warmup function to wait for the cacheSignal to indicate it is complete before aborting. This should not alter any program behavior but is observable if you contrive a very slow prefetch request like awaiting a setTimeout inside loading.tsx This allows us to remove the dev only property tracking the prerenderResumeCache in the request store type. I also moved the prerender->render cache conversion into the warmup function since it leaks less about the implementation generatlized the name since it being a cache from a warmup is sort of an implementation detail from the render interface perspective so we'll just call it a devRenderResumeCache. still quite the mouthful
Author
Parents
Loading