Next.js 16 Cache Demo

WordPress integration with 'use cache' directive and surrogate key revalidation

How this differs from Next.js 15

  • • No Surrogate-Key headers in next.config — cache tags are set programmatically via cacheTag()
  • • Uses 'use cache' directive instead of ISR revalidate exports
  • • Two cache handlers: legacy (cache-handler.mjs) + use-cache (use-cache-handler.mjs)
  • • Infinite cacheLife — pages stay cached until WordPress triggers revalidation