| 1 | import { revalidatePath } from "next/cache"; |
| 2 | |
| 3 | export const dynamic = "force-dynamic"; |
| 4 | |
| 5 | // On-demand revalidation: purges the /isr entry from the (writable) |
| 6 | // incremental cache so the next request re-renders. |
| 7 | export function POST() { |
| 8 | revalidatePath("/isr"); |
| 9 | return Response.json({ revalidated: true }); |
| 10 | } |