Next.js Discord

Discord Forum

How are fetch tags synced?

Answered
Ragdoll posted this in #help-forum
Open in Discord
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 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.
Answered by Ray
yes, you need to make the tag unique for you usecase
View full answer

2 Replies