They answer two questions: what gets invalidated, and how stale the next read may be.
| Invalidates | Next read | Server Action | Route handler | |
|---|---|---|---|---|
revalidatePath(p) |
entries rendered by route p (its soft tags) |
fresh | yes, re-renders the page | yes |
revalidateTag(t, 'max') |
every entry tagged t |
stale, refreshed in background | yes, no re-render | yes |
updateTag(t) |
every entry tagged t |
waits for fresh data | yes, re-renders the page | throws |
refresh() |
nothing | n/a | yes, re-renders the page | throws |
revalidatePathworks by path, through the_N_T_/…tags Next attaches to each route and layout, so it reaches the route's page entry and the data it fetched. Pass'layout'or'page'for a dynamic pattern like/blog/[slug]. Other routes using the same data stay cached.revalidateTagis stale-while-revalidate; its profile ('max', anothercacheLifeprofile, or{ expire }) caps how long stale may be served. For webhooks and CMS updates.updateTagis for read-your-own-writes: the user who saved sees the save.refreshre-renders the current route, so state outside the cache (cookies, a database read with no cache) shows its new value. Cached data stays as it was.router.refresh()is the client-side relative: aGETfor the current route's payload, no server invalidation.
I checked every row on Next.js 16.4.5 under next start, with cacheComponents off (tagged fetch) and on (use cache + cacheTag); the behaviour matched. All four threw when called during render.
Legacy: before 16.0, revalidateTag(tag) took one argument and expired immediately. That form now fails type-checking and logs a deprecation warning, but still behaves like updateTag.