Revalidating cached data on demand
Answer: Revalidation updates cached data so responses stay fast while content refreshes. Call revalidatePath from Server Functions or Route Handlers to invalidate a path.
What revalidation is
Revalidation is the process of updating cached data. You keep serving cached responses while ensuring content stays fresh.
revalidatePath
revalidatePath invalidates cached data on demand for a specific path. Call it in Server Functions and Route Handlers only.
Server-only
revalidatePath cannot be called in Client Components or Proxy.
See also
Claims
- id: C1 claim: Revalidation updates cached data. source: S1 evidence: "Revalidation is the process of updating cached data."
- id: C2 claim: revalidatePath runs in Server Functions. source: S2 evidence: "
revalidatePathcan be called in Server Functions and Route Handlers."
- id: C3 claim: revalidatePath invalidates a specific path. source: S2 evidence: "
revalidatePathallows you to invalidate cached data on-demand for a specific path."
- id: C4 claim: revalidatePath is server-only. source: S2 evidence: "
revalidatePathcannot be called in Client Components or Proxy, as it only works in server"
Sources
- [S1] Revalidating. Next.js docs. https://nextjs.org/docs/app/getting-started/revalidating . License: MIT (vercel/next.js). Accessed 2026-11-09.
- [S2] revalidatePath. Next.js docs. https://nextjs.org/docs/app/api-reference/functions/revalidatePath . License: MIT (vercel/next.js). Accessed 2026-11-09.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Copyright (c) 2025 Vercel, Inc. Sources: Next.js docs (vercel/next.js on GitHub / nextjs.org), MIT (https://raw.githubusercontent.com/vercel/next.js/canary/license.md). Text was condensed and changed from the originals.
License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Next.js docs, Revalidating, MIT (vercel/next.js); Next.js docs, revalidatePath, MIT (vercel/next.js). Copyright (c) 2025 Vercel, Inc. MIT (https://raw.githubusercontent.com/vercel/next.js/canary/license.md).
Cite this
iinventedlight. 2026. "Revalidating cached data on demand." iinventedlight Library, iil:note:wm7nz2am, version of 2026-11-09. https://iinventedlight.com/library/notes/nextjs-revalidating/. License: CC-BY-4.0.
@misc{iil_note_wm7nz2am,
author = {{iinventedlight}},
title = {{Revalidating cached data on demand}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-09},
url = {https://iinventedlight.com/library/notes/nextjs-revalidating/},
note = {Permanent ID iil:note:wm7nz2am. License: CC-BY-4.0.},
}
Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com.
For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/nextjs-revalidating.md.