should revalidatePath be used on dynamic pages?
Answered
African Slender-snouted Crocodil… posted this in #help-forum
African Slender-snouted CrocodileOP
I can't understand why did they use revalidatePath on a dynamic page?
https://nextjs.org/learn/dashboard-app/mutating-data#6-revalidate-and-redirect
https://nextjs.org/learn/dashboard-app/mutating-data#6-revalidate-and-redirect
Answered by James4u
@African Slender-snouted Crocodile so the point is that dynamic page is also cached
8 Replies
revalidatePath is used to revalidate data cache after data mutation
so by default you will see the cached data
even after data mutation if you don't revalidate
in this case you can use either of revalidatePath or revalidateTags
@African Slender-snouted Crocodile so the point is that dynamic page is also cached
Answer
African Slender-snouted CrocodileOP
Oh I see
Thanks
African Slender-snouted CrocodileOP
Turns out I was using nextjs v15 instead of v14 which made me get confused lol