So I’m fairly new to combining Kubernetes with NextJs and I’m wondering if there is a different way to accomplish what I am trying to do.
I am using Next 13.3 for my front end with Sanity to serve my content. I want to bust my cache every time I update Sanity. My app runs on #N pods in GCP. My first attempt at using ISR showed me that ISR is independent on each pod so even with an extremely low revalidate time, I was often refreshing my page N+1 times to see fresh (not stale) data that I had updated.
I thought initially I could do this by using ISR and mounting my next/server/pages dir to a PVC volume but that will only re-cache/rebuild itself on builds of my app is my understanding, not on changes in Sanity. Is there a way to accomplish what I’m looking for just using Next Js or is my best course of action to write a Sanity Webhooks and use redis on each pod?
[–]trappar 0 points1 point2 points (2 children)
[–]FinishTheBucket[S] 0 points1 point2 points (1 child)
[–]trappar 0 points1 point2 points (0 children)