@tank/nextjs-caching-guide

Diagnose Next.js App. 14-16 stale page causes across cache layers and revalidation strategies.

1|1|Updated Feb 20, 2026
One-click install
npx skills add https://github.com/tankpkg/packages --skill tank-nextjs-caching-guide
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: @tank/nextjs-caching-guide
Source: https://github.com/tankpkg/packages/tree/main/skills/nextjs-caching-guide
Command: npx skills add https://github.com/tankpkg/packages --skill tank-nextjs-caching-guide

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill helps you diagnose and fix stale or slow Next.js App Router pages by explaining which cache layer is responsible and how to invalidate it correctly.

Core Features & Use Cases

  • Cache-layer diagnosis: Distinguishes Request Memoization, Data Cache, Full Route Cache, and Router Cache so you can target the real source of stale data.
  • Revalidation strategy guidance: Explains when to use time-based revalidation, revalidateTag, revalidatePath, router.refresh, and ISR patterns.
  • Version-aware Next.js advice: Covers Next.js 14 through 16 changes, including fetch default behavior, the use cache model, cacheLife, cacheTag, and migration from unstable_cache.
  • Debugging and deployment support: Helps verify cache behavior with headers, logs, static versus dynamic indicators, and self-hosted CDN caching patterns.
  • Use Case: If a product page updates in the database but still shows old content, this Skill shows whether the fix belongs in the server action, fetch tags, route revalidation, client refresh, or CDN configuration.

Quick Start

Ask the Skill to analyze your Next.js caching issue and recommend the correct cache layer, revalidation method, and version-specific fix.

Frequently Asked Questions about @tank/nextjs-caching-guide

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
Why does my Next.js App Router page show stale data after a database update?

Next.js stale data occurs when the wrong cache layer is invalidated. The issue must be diagnosed across request memoization, data cache, full route cache, or router cache to determine if the fix belongs in server actions, fetch tags, or route revalidation.

How do I fix Next.js caching issues with revalidatePath and revalidateTag?

Next.js caching issues are fixed by applying revalidatePath for broad route invalidation or revalidateTag for targeted fetch cache updates. The correct strategy depends on identifying whether the stale content originates from the full route cache or the data cache.

What is the difference between full route cache and router cache in Next.js?

The full route cache stores statically rendered server-side output on the server, while the router cache caches visited route segments on the client. Distinguishing these layers is essential to target the correct source of outdated content or slow renders.

How do I migrate from unstable_cache to the use cache model in Next.js 14-16?

Migrating from unstable_cache to the use cache model involves adopting version-aware directives like cacheLife and cacheTag. This transition aligns caching behavior with Next.js 14-16 updates for more predictable data cache control and revalidation.

Does Next.js ISR work with self-hosted CDN edge caching configurations?

Next.js ISR works with self-hosted CDN configurations by utilizing time-based revalidation and custom headers. Debugging cache behavior requires verifying static versus dynamic indicators and logs to ensure the CDN edge cache invalidates correctly.

Why is Next.js fetch cache not revalidating with router.refresh?

Next.js fetch cache may not revalidate with router.refresh because it primarily clears the client-side router cache, not the server-side data cache. Fixing this requires server actions utilizing revalidatePath or revalidateTag to purge outdated data.