Next.js 按需重新验证完全指南:revalidatePath、revalidateTag 与四层缓存失效实战 (2026)
Next.js 15 按需重新验证是让静态页面在 CMS 发布后立即刷新的标准方案。这篇实战指南拆解 revalidatePath 与 revalidateTag 的取舍、四层缓存的相互作用、Webhook 触发模式,以及八种最常见的"不生效"故障与修复方法。
Priya spent four years on Vercel's developer experience team, where she wrote a chunk of the Turbopack incremental cache layer and rewrote the official App Router migration codemods used by tens of thousands of teams. Before that, she shipped the checkout funnel rewrite at Shopify on Next.js 12, cutting LCP from 3.4s to 1.1s on mid-tier Android. These days she runs an independent consultancy helping Series B companies untangle Pages Router monoliths into RSC-first App Router architectures. She has opinions about Server Actions, mostly negative ones, and is slowly coming around on Partial Prerendering after benchmarking it against six production workloads. She writes about cache semantics, streaming SSR, and the parts of the React docs that quietly contradict the Next.js docs. Eight years in frontend, three of them spent yelling at hydration mismatches.
Next.js 15 按需重新验证是让静态页面在 CMS 发布后立即刷新的标准方案。这篇实战指南拆解 revalidatePath 与 revalidateTag 的取舍、四层缓存的相互作用、Webhook 触发模式,以及八种最常见的"不生效"故障与修复方法。