Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/01-app/02-guides/how-revalidation-works.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,12 @@ In the [cache handler API](/docs/app/api-reference/config/next-config-js/cacheHa

## Multi-Instance Considerations

> ⚠️ **Important:** In multi-instance or serverless environments (such as deployments on Vercel), revalidation is instance-local by default.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is repeating the first sentence on 63 no? and the platform mentioned here, does handle this already.

>
> Calling `revalidateTag()` or `revalidatePath()` only invalidates the cache on the instance handling the request. Other instances may continue serving stale content until they receive the invalidation event through a shared cache or coordination mechanism.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Repeats the second sentence on 63, only adding revalidatePath

>
> To ensure consistent revalidation across instances, you should configure a shared cache handler (for example, using Redis or another external store).
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The ### Multi-instance with shared cache section mentions this though - and the Redix example is actually linked further down


When running multiple Next.js instances behind a load balancer, revalidation events are local by default. Calling `revalidateTag()` on instance A only invalidates the cache on that instance. Other instances continue serving the stale content until they learn about the invalidation.

The cache handler API provides two hooks for distributed coordination:
Expand Down
Loading