Files
5dcfec401a Add refresh API to next/cache (#84666)
This provides a way to refresh the client cache from within a server
action. This is useful when you need to refresh the client UI / read
your writes without needing to rely on `updateTag`.

---------

Co-authored-by: JJ Kasper <[email protected]>
2025-10-09 11:47:51 -07:00

9 lines
172 B
TypeScript

import { refresh } from 'next/cache'
import { connection } from 'next/server'
export async function GET() {
await connection()
refresh()
return new Response('ok')
}