Files
Josh StoryandGitHub 76d2beaeb8 [Cache Components] Remove unstable prefix from unstable_cacheTag (#84880)
`cacheLife` is now stable and does not require an unstable prefix
2025-10-16 07:01:44 -07:00

19 lines
336 B
TypeScript

import { updateTag, cacheTag } from 'next/cache'
async function refresh() {
'use server'
updateTag('home')
}
export default async function Page() {
'use cache'
cacheTag('home')
return (
<form action={refresh}>
<button id="refresh">Refresh</button>
<p id="t">{new Date().toISOString()}</p>
</form>
)
}