Quest for Codev2.0.0
/
SIGN IN
next.js/test/e2e/app-dir/instant-validation-build/app/(default)/valid-await-cache-without-suspense/private/page.tsx
page.tsx21 lines566 B
export const unstable_instant = true
export const unstable_prefetch = 'force-runtime'

export default async function Page() {
  await privateCachedIO()
  return (
    <main>
      <p>
        This page awaits a private cache. stage. The page is runtime
        prefetchable, so 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 privateCachedIO() {
  'use cache: private'
  await new Promise<void>((resolve) => setTimeout(resolve, 5))
}