Missing Revalidation

Server actions that change data with no revalidatePath or revalidateTag

warningReliabilitymissing-revalidation

Why this matters

After a server action mutates data, the page still shows stale cached content unless you call revalidatePath or revalidateTag. Users think their action didn't work.

Example

Flaggedapp/actions/posts.ts
"use server";

export async function updateTitle(id: string, title: string) {
  await db.post.update({
    where: { id },
    data: { title },
  });
  // Page still shows the old title!
}
Fixedapp/actions/posts.ts
"use server";

import { revalidatePath } from "next/cache";

export async function updateTitle(id: string, title: string) {
  await db.post.update({
    where: { id },
    data: { title },
  });
  revalidatePath("/posts");
}

How to fix

Call revalidatePath() or revalidateTag() after every server action that writes to the database, so cached pages show fresh data.

Reference

In the output
Findings carry "ruleId": "missing-revalidation" in --json and the same id in SARIF and in the terminal.
Silence one line
// prodlint-disable-next-line missing-revalidation
Silence a whole file
// prodlint-disable missing-revalidation at the top of the file
How it works
Matches text patterns. Source on GitHub