mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
This ensures we properly honor config and fetch based revalidate on the same page in fetch cache. Fixes: https://github.com/vercel/next.js/actions/runs/4529647521/jobs/7978177827
25 lines
456 B
JavaScript
25 lines
456 B
JavaScript
export const revalidate = 3
|
|
|
|
export const metadata = {
|
|
title: 'Cache Test',
|
|
}
|
|
|
|
export default async function Page() {
|
|
const data = await fetch(
|
|
'https://next-data-api-endpoint.vercel.app/api/random',
|
|
{
|
|
next: {
|
|
revalidate: 9,
|
|
},
|
|
}
|
|
).then((res) => res.text())
|
|
|
|
return (
|
|
<>
|
|
<p>/variable-config-revalidate/revalidate-3</p>
|
|
<p id="date">{Date.now()}</p>
|
|
<p id="random-data">{data}</p>
|
|
</>
|
|
)
|
|
}
|