Files
JJ KasperandGitHub 4a2df3c375 Fix fetch cache config and fetch revalidates (#47573)
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
2023-03-27 13:08:23 -07:00

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>
</>
)
}