SSG and ISR - Static Pages and generateStaticParams
Build static pages and keep them fresh in Next.js 16, with generateStaticParams, time-based and on-demand ISR, in both the Cache Components and the legacy model.
Archive
5 notes match these filters
Build static pages and keep them fresh in Next.js 16, with generateStaticParams, time-based and on-demand ISR, in both the Cache Components and the legacy model.
How the Cache Components model works in Next.js 16, what the compiler turns a 'use cache' function into, how the cache key is built from the function id, arguments, closures and build id, how cacheLife and cacheTag set an entry's lifetime and tags, and how cache handlers, 'use cache: private' and 'use cache: remote' store the result.
How cached data gets fresh again in Next.js 16, covering time-based revalidation with cacheLife, revalidateTag with a profile, updateTag for read-your-own-writes, revalidatePath and its implicit path tags, refresh, and how an invalidation travels from a Server Action through the cache handlers to the client router.
A complete, copy-pasteable TanStack Query v5 setup for the Next.js 16.4.3 App Router - per-request clients, server prefetch with streamed pending queries, HydrationBoundary, useSuspenseQuery, mutations that invalidate both caches, Cache Components, and the pitfalls.
Fixes for the data and caching problems Next.js 16 developers hit most, from stale data after a mutation to the blocking-route error, each traced to the source line that causes it.