-
Notifications
You must be signed in to change notification settings - Fork 27.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Segment Cache] Support <Link prefetch={true}>
This implements support in the Segment Cache for "full" link prefetches, typically initiated by passing `prefetch={true}` to a `<Link>`. The goal of a full prefetch is to request all the data needed for a navigation, both static and dynamic, so that once the navigation occurs, the router does not need to fetch any additional data. So, a full prefetch implicitly instructs the client cache to treat the response as static, even the dynamic data. The implementation is largely the same as what we do to support non-PPR -enabled routes — a request tree is sent to the server describing which segments are already cached and which ones need to be rendered. While constructing the request tree, if all the segments are already in the client cache, the request can be skipped entirely. The main difference is that a full prefetch will only reuse a cached segment entry if it does not contain any dynamic holes.
- Loading branch information
Showing
13 changed files
with
814 additions
and
254 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.