Files
next.js/test/e2e/app-dir/segment-cache/basic/app/cache-life-seconds/page.tsx
Josh StoryandGitHub 8cab15c0c9 [Cache Components] Remove unstable prefix from unstable_cacheLife (#84877)
`cacheLife` is now stable and does not require an unstable prefix
2025-10-15 08:14:04 -07:00

16 lines
351 B
TypeScript

import { cacheLife } from 'next/cache'
export default async function CacheLifeSecondsPage() {
'use cache'
cacheLife({ stale: 0, revalidate: 1, expire: 60 })
const randomNumber = Math.random()
return (
<div id="cache-life-seconds-page">
<p>Cache Life Seconds Page</p>
<p id="random-value">{randomNumber}</p>
</div>
)
}