#On-demand Revalidation for entire path
13 messages · Page 1 of 1 (latest)
From what I’ve seen it needs to be a single path
I am also looking for a solution to the same problem.
My scenario is that I have a blog site and when the name of the site changes, I need to change the name of the site on all pages.
I am not finding a suitable way to do this.
@inland wraith Have you solved this problem?
There's actually a lot of people that want this I believe, including me. I don't think there's a way to do this atm in nextjs sadly
The only way this is now possible is to know the paths that belong to this route (which you can get like you would on getStaticPaths) and then loop through them and revalidate each one of them
If you don’t know the paths ie in the case you have fallback:"blocking" and paths:[] (which somebody really shouldn’t do anyways) then you are out of luck
Thanks for your reply.
One possible way I can think of is to set the revalidate to be as small as possible. For example revalidate: 10.
But I'm not sure if this has any negative effects.
But you know the paths right?
Assuming you have a proper getStaticPaths
Actually, I do use paths: [], because I am developing a multi-user blog platform. The platforms template used
https://github.com/vercel/platforms
Although I can query the database to know the path list, its probably thousands of entries. I think that thousands of loops may have speed problems.
Yeah but it is better than having 1000 regenerations every 10 seconds
And also regeneration is asynchronous anyways
This is my current code