Shared ISR storage and revalidation of multiple instances #34517
-
Hi I am very excited to see On-demand Incremental Static Regeneration is finally here 🎉. So now, that this is possible: How can I invalidate the cache of multiple Next.js instances at once? Is there a way I can share the ISR cache between multiple Next.js instances? I use multiple Next.js instances for scaling (SSR/ISR are both used at the moment in a simple docker compose + Traefik setup). Am I correct that only an API handler can invalidate the cache? My plan would be to create a simple job that polls a shared storage which holds paths that need to be validated. But this is more challenging if we can only do it in a request context. |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 6 replies
-
Hi Michael, did you figure out how to handle this situation ? I have the same issue... |
Beta Was this translation helpful? Give feedback.
-
Hi, some related documentation for this and self-hosting has been added here https://nextjs.org/docs/basic-features/data-fetching/incremental-static-regeneration#self-hosting-isr |
Beta Was this translation helpful? Give feedback.
-
Thanks a lot 🙏
…On Sep 29, 2022 at 1:22 AM -0400, JJ Kasper ***@***.***>, wrote:
Hi, some related documentation for this and self-hosting has been added here https://nextjs.org/docs/basic-features/data-fetching/incremental-static-regeneration#self-hosting-isr
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you commented.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Hey everyone – we have just published new documentation on self-hosting, including how to configure a custom cache handler for use with ISR / Data Cache in both the Pages and App Router. These docs go in depth about how other features like Image Optimization, Middleware, Environment Variables, Build Caching, and more work when self-hosted. There's also updated Docker based examples. https://nextjs.org/docs/app/building-your-application/deploying |
Beta Was this translation helpful? Give feedback.
Hey everyone – we have just published new documentation on self-hosting, including how to configure a custom cache handler for use with ISR / Data Cache in both the Pages and App Router. These docs go in depth about how other features like Image Optimization, Middleware, Environment Variables, Build Caching, and more work when self-hosted. There's also updated Docker based examples.
https://nextjs.org/docs/app/building-your-application/deploying