Skip to main content
CMSquestions

Set-up-on-demand-revalidation-with-cms

AdvancedQuick Answer

Key Takeaways

  • On-demand revalidation targets specific pages or cache tags, unlike full rebuilds which regenerate everything
  • Next.js provides `revalidatePath()` (by URL) and `revalidateTag()` (by cache tag) for precise invalidation
  • A CMS webhook triggers revalidation—no polling, no timers, no manual deploys
  • Map document types to affected URLs: a changed `post` document should revalidate its own page plus any listing pages that include it
  • Handle edge cases: referenced content changes, bulk publishes, and failed revalidations need explicit strategies