cache tag

A label attached to cached data, such as products, so all entries with that label can be invalidated together.

In more detail

Add tags with fetch(url, { next: { tags: ['products'] } }) or cacheTag() inside use cache, then call revalidateTag('products') after a change. One entry can carry several tags, such as a collection tag and a record tag.

Related terms

Taught in

References