Caching
Publication invalidation ordering
Invoke revalidateTag with max from a supported server context after the database commit. It marks tagged data stale rather than synchronously refreshing every page. This helper is not a Server Action or public endpoint itself. Durable retry and logging belong to the caller. Source: https://nextjs.org/docs/app/api-reference/functions/revalidateTag. Documentation-reviewed illustrative draft; installed declarations and runtime not verified.
Formal Syntax & Structure
nextjs syntaxnextjs
commit → durable event → revalidateWorking Example
Example Snippetnextjs
import {revalidateTag} from 'next/cache';export function markPublicCatalogStale(){ revalidateTag('public-catalog', 'max');}