Functions

Server Action refresh

The refresh export from next/cache is restricted to Server Actions. It requests a client-router refresh without itself purging the server data cache. The client router method is a separate API. Source: https://nextjs.org/docs/app/api-reference/functions/refresh. Documentation-reviewed illustrative draft; exact package and execution not verified.

Formal Syntax & Structure

nextjs syntaxnextjs
refresh(): void

Working Example

Example Snippetnextjs
'use server';import { refresh } from 'next/cache';// app/actions.ts; public view refresh only, no mutation.export async function refreshCatalogView() { refresh(); }
Next.js Reference