next.js
d27f18f3 - Cache the head separately from the route tree (#84724)

Commit
89 days ago
Cache the head separately from the route tree (#84724) Currently the head (i.e. the viewport and the metadata) is stored in the same cache entry as the route tree. This is not ideal because the head may or may not contain application data, and the response can differ depending on the prefetch strategy. We need to be able to re-fetch the head without also invalidating the route tree. This refactors the Segment Cache to treat the head data as a special kind of "segment". It doesn't appear in the route tree, so there's some logic to account for that, but for the most part it reuses all the existing implementation for fetching and caching normal segment data.
Author
Parents
Loading