-
Notifications
You must be signed in to change notification settings - Fork 27.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix revalidate: false detection in app (#49473)
When revalidate isn't defined in the tree at all and a fetch without cache/revalidate fields is done we are incorrectly marking the initial revalidate period with a time based value when it should be `false`. This causes pages that should be fully static to revalidate unexpectedly. x-ref: [twitter thread](https://twitter.com/diegohaz/status/1655638433795014657) x-ref: [slack thread](https://vercel.slack.com/archives/C03S8ED1DKM/p1683566860136879)
- Loading branch information
Showing
7 changed files
with
75 additions
and
23 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
export default async function Page() { | ||
console.log('rendering index') | ||
|
||
const data = await fetch( | ||
'https://next-data-api-endpoint.vercel.app/api/random?page' | ||
).then((res) => res.text()) | ||
|
||
return ( | ||
<> | ||
<p id="page">/variable-revalidate/revalidate-360</p> | ||
<p id="page-data">{data}</p> | ||
<p id="now">{Date.now()}</p> | ||
</> | ||
) | ||
} |
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