Next.js

Full-stack React framework

167 tutorials
12 of 167 tutorials
Aug 23, 2026· 7 min read

`cacheTag` Explained: Tagging Cached Data

The cacheTag function labels cached entries for on-demand invalidation. Learn how to tag data and purge it with updateTag or revalidateTag.

nextjscache componentsCaching
Aug 23, 2026· 6 min read

`revalidateTag` vs `updateTag`: Which One to Use

Both invalidate a cache tag, but updateTag expires data immediately while revalidateTag refreshes in the background. Learn which to call after a mutation.

cache componentsCachingnextjs
Aug 23, 2026· 7 min read

`revalidatePath` Explained with Real Examples

revalidatePath invalidates cached data for a specific route. Learn the path and type parameters, page vs layout revalidation, and Server Action vs Route Handler behavior.

nextjsCachingcache components
Aug 23, 2026· 6 min read

Migrating from `unstable_cache` to `use cache`

Move off the deprecated unstable_cache wrapper and onto the use cache directive. Drop key parts, map options to cacheLife and cacheTag, and know the persistence change.

Cachingcache componentsnextjs