Next.js Discord

Discord Forum

cookies, cache, and tags

Unanswered
Trigg Hound posted this in #help-forum
Open in Discord
Trigg HoundOP
From my understanding if the cookies() function is invoked in a RSC by default the page will become dynamically rendered.

If I use the cookies() to get a user token, and make an API request that I uses tags
next: {
  tags: ["data-tag"]
}

Will this be cached or dynamically rendered? Will I have to specifically add the cache property like this?
cache: "force-cache",
next: {
  tags: ["data-tag"]
}

My thought process is since tags are used as a way to invalidate certain data then it should be defaulting to being cached, but I could be all wrong in this ideology. Any advice or input would be appreciated.

Thanks in advance

0 Replies