How are fetch tags synced?
Answered
Ragdoll posted this in #help-forum
RagdollOP
Hello, I have a quick question concerning fetch tags and how they work more specifically.
My concern is whether fetch tags are per client, or per server.
At the moment, I have a fetch tag for the users basket/cart, which I later use
But this fetch tag is the same for all users, would that trigger the revalidation on all users, or does nextjs figure out which user it is meant for via some magic with the server actions or such?
Or should I instead just append the basket id or such to the end of the tag, so it truely becomes unique?
I hope this question/explanation makes sense, and thank you to everyone who is reading this & trying to help.
My concern is whether fetch tags are per client, or per server.
At the moment, I have a fetch tag for the users basket/cart, which I later use
revalidateTag on to refetch.But this fetch tag is the same for all users, would that trigger the revalidation on all users, or does nextjs figure out which user it is meant for via some magic with the server actions or such?
Or should I instead just append the basket id or such to the end of the tag, so it truely becomes unique?
I hope this question/explanation makes sense, and thank you to everyone who is reading this & trying to help.
2 Replies
RagdollOP
Thank you Ray