next.js
5ec4d7a4 - [Cache Components] Prevent streaming fetch calls from hanging in dev (#89171)

Commit
20 hours ago
[Cache Components] Prevent streaming fetch calls from hanging in dev (#89171) With Cache Components enabled in development, fetches without an explicit cache config were incorrectly routed through `createCachedPrerenderResponse` during the cache filling phase due to the `serverComponentsHmrCache` condition. This function awaits the entire response before returning to the caller, which prevents infinitely streaming responses from ever being read or aborted. This is a regression that was introduced in #84088. These fetches should be treated as dynamic and use `createCachedDynamicResponse` instead, which returns immediately and caches in the background with proper error handling. The fix adds `isCacheableRevalidate` to the condition so only explicitly cacheable fetches use the blocking path. Additionally, the "Failed to set fetch cache" warning is now suppressed when the request's abort signal was triggered, since aborting is intentional.
Author
Parents
Loading