next.js
65e0b7b7 - bugfix: static resources staleTime should be renewed once refetched (#81771)

Commit
159 days ago
bugfix: static resources staleTime should be renewed once refetched (#81771) When the `x-nextjs-staletime` header is sent from the server, the client router was discarding all of its staleTime heuristics (such as lastUsedTime and "reusable" cache entries). This caused an issue where after the static staleTime window expired and the prefetch data was renewed, the static staleTime itself was not being renewed. As a result, once the static staleTime expired, the client would continuously refetch the resource on every navigation, even though it had just been renewed. This removes the `x-nextjs-staleTime` logic from this heuristic because it was only intended to be considered for the new `clientSegmentCache` & cache components work
Author
Parents
Loading