Next.js Discord

Discord Forum

Nextjs fetch tag scope

Unanswered
West African Crocodile posted this in #help-forum
Open in Discord
West African CrocodileOP
Let's say i have ["cart"] tag stored in cache like bellow,
const cart = await fetch(..., {next: {tags: ["cart"]}});

and i have 2 different users calling same function and accessing same tag, does it mean both users will see same cart ?

because according to docs cache should be shared since server is the one who keeps track of the cache

but from experimentation it's not the case

can someone enlighten me please ?

I am looking at revalidateTag function

2 Replies

West African CrocodileOP
The Data Cache is persistent across incoming requests and deployments unless you revalidate or opt-out.
More confused