next.js/test/production/app-dir/use-cache-expire/app/static/page.tsx
page.tsx12 lines251 B
import { cacheLife } from 'next/cache'

async function getValue() {
  'use cache'
  cacheLife({ revalidate: 60, expire: 300 })
  return new Date().toISOString()
}

export default async function Page() {
  return <p id="value">{await getValue()}</p>
}
Quest for Codev2.0.0
/
SIGN IN