mirror of
https://github.com/hanzoai/next.js.git
synced 2026-10-30 14:46:38 +00:00
This API has experimental modes for build validation but the dev validation is going to be stable in the next release.
20 lines
460 B
TypeScript
20 lines
460 B
TypeScript
export const instant = { level: 'experimental-error' }
|
|
|
|
export default async function Page() {
|
|
await cachedIO()
|
|
return (
|
|
<main>
|
|
<p>
|
|
This page awaits a cache. This should never need a suspense boundary.
|
|
This is a sanity check to make sure that we warm caches correctly when
|
|
validating.
|
|
</p>
|
|
</main>
|
|
)
|
|
}
|
|
|
|
async function cachedIO() {
|
|
'use cache'
|
|
await new Promise<void>((resolve) => setTimeout(resolve, 5))
|
|
}
|