mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
If a build time fetch cache is present from a previous build we don't want to unexpectedly use it when flush to disk is set to false in a successive build as it can leverage stale data unexpectedly. x-ref: [slack thread](https://vercel.slack.com/archives/C03S8ED1DKM/p1701266754905909) Closes NEXT-1750 Co-authored-by: Zack Tanner <[email protected]>
17 lines
310 B
TypeScript
17 lines
310 B
TypeScript
import React from 'react'
|
|
|
|
export const revalidate = 30
|
|
|
|
export default async function Page() {
|
|
const data = await fetch(
|
|
'https://next-data-api-endpoint.vercel.app/api/random'
|
|
).then((res) => res.text())
|
|
|
|
return (
|
|
<>
|
|
<p id="page">index page</p>
|
|
<p id="data">{data}</p>
|
|
</>
|
|
)
|
|
}
|