revalidateTag() vs. revalidatePath()
Unanswered
Cape lion posted this in #help-forum
Cape lionOP
Hi guys, just wanted to ask a quick question regarding the distinction between the two.
Best is to give an example. I have a home page with a few blog posts, a blog page with all posts and a single post page (dynamic route
All of the pages are SSG and I'd like to revalidate them on demand.
When I update a post from the CMS, I need to revalidate. If I revalidate the tag, I've noticed that the home and blog page containing the updated post are still staying static and showing the old version. So I do one tag update for
Thanks
Best is to give an example. I have a home page with a few blog posts, a blog page with all posts and a single post page (dynamic route
/blog/[slug]).All of the pages are SSG and I'd like to revalidate them on demand.
When I update a post from the CMS, I need to revalidate. If I revalidate the tag, I've noticed that the home and blog page containing the updated post are still staying static and showing the old version. So I do one tag update for
/blog/[slug] and two path updates. But since /blog/[slug] is an actual path, can't I use a revalidatePath() on it as well? What's the difference here between tag and path?Thanks