Quest for Codev2.0.0
/
SIGN IN
next.js/test/e2e/app-dir/instant-validation-build/app/(default)/valid-await-cache-without-suspense/static/page.tsx
page.tsx20 lines442 B
export const unstable_instant = true

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