Next.js Discord

Discord Forum

Next 14. Should cache: no-store or revalidate: 0 be used to invalidate cache for fetch.

Answered
Oriental posted this in #help-forum
Open in Discord
OrientalOP
I'm dealing with a caching issue where I need data pulled from a CMS to reflect on the page. It doesn't need to be in real time, I just don't want static routes. From the the docs, it sounds like cache: no-store doesn't affect the full route cache while revalidate: 0 will. However, the docs mention that opting out of full route cache is, "in other words, dynamically render components".

Then in another part of the docs, it mentions that any uncached data request will cause a route to be dynamically rendered (which means that any uncached data request affects the full route cache???). So does this mean the two cache options are equivalent? Sorry if this is all over the place, I am just confused at what I should be using or if it is a non-issue.
Answered by Oriental
Ok, I was overcomplicating it. The answer is yes, they both cause the route to be opted out of the full route cache
View full answer

1 Reply

OrientalOP
Ok, I was overcomplicating it. The answer is yes, they both cause the route to be opted out of the full route cache
Answer