diff --git a/docs/02-app/01-building-your-application/10-deploying/index.mdx b/docs/02-app/01-building-your-application/10-deploying/index.mdx index 088ef4b4cd9cb..1fa89c2d2f307 100644 --- a/docs/02-app/01-building-your-application/10-deploying/index.mdx +++ b/docs/02-app/01-building-your-application/10-deploying/index.mdx @@ -175,11 +175,13 @@ module.exports = class CacheHandler { }) } - async revalidateTag(tag) { + async revalidateTag(tags) { + // tags is either a string or an array of strings + tags = [tags].flat() // Iterate over all entries in the cache for (let [key, value] of cache) { // If the value's tags include the specified tag, delete this entry - if (value.tags.includes(tag)) { + if (value.tags.some((tag) => tags.include(tag))) { cache.delete(key) } } diff --git a/docs/02-app/02-api-reference/05-next-config-js/incrementalCacheHandlerPath.mdx b/docs/02-app/02-api-reference/05-next-config-js/incrementalCacheHandlerPath.mdx index 091e5b875eedb..a4dddcd7b7c83 100644 --- a/docs/02-app/02-api-reference/05-next-config-js/incrementalCacheHandlerPath.mdx +++ b/docs/02-app/02-api-reference/05-next-config-js/incrementalCacheHandlerPath.mdx @@ -43,9 +43,9 @@ Returns `Promise`. ### `revalidateTag()` -| Parameter | Type | Description | -| --------- | -------- | ---------------------------- | -| `tag` | `string` | The cache tag to revalidate. | +| Parameter | Type | Description | +| --------- | ---------------------- | ----------------------------- | +| `tag` | `string` or `string[]` | The cache tags to revalidate. | Returns `Promise`. Learn more about [revalidating data](/docs/app/building-your-application/data-fetching/incremental-static-regeneration) or the [`revalidateTag()`](/docs/app/api-reference/functions/revalidateTag) function.