next.js
743d06b2 - Respect stale time header in client prefetch cache (#71280)

Commit
1 year ago
Respect stale time header in client prefetch cache (#71280) When sending a statically generated response, the server includes the stale time of the data as a response header. This updates the client prefetch cache to use this value to determine when the data is stale. When available, the stale time sent by the server takes precedence over all other existing heuristics. In the future, when PPR is enabled, the server-generated value should *always* be available during a prefetch, unless the server prefetch hasn't received any data by the time the navigation happens, in which case we should skip the prefetch anyway.
Author
Parents
Loading