CodeZettaInterview Hub

Next.js · ISR · Mid-Level · Comparison

Explain revalidateTag vs revalidatePath.

Short Interview Answer

Tag invalidates cached data fetches sharing a tag; path invalidates a route's cache entries.

Detailed Explanation

Tagging models domain entities (product:123). Paths are coarser. Design tag taxonomy early for scalable invalidation.

Did you know this answer?