next.js/test/e2e/app-dir/segment-cache/prefetch-inlining/app/test-on-demand-revalidate/page.tsx
page.tsx18 lines361 B
import { cacheLife } from 'next/cache'

async function CachedValue() {
  'use cache'
  cacheLife({ stale: 120 })

  return <p id="page-on-demand-revalidate-value">{Math.random()}</p>
}

export default function OnDemandRevalidatePage() {
  return (
    <>
      <p id="page-on-demand-revalidate">On-demand revalidate page</p>
      <CachedValue />
    </>
  )
}
Quest for Codev2.0.0
/
SIGN IN