Next.js 16 · Data and server code

Refresh cached data

Invalidate cached data for a route after a change.

import { revalidatePath } from "next/cache";

revalidatePath("/posts");

Official Next.js 16 documentation

More data and server code commands

All data and server code commands · Next.js 16 cheatsheet

Was this page helpful?