Next.js Discord

Discord Forum

Next.js caching issue in production and development

Unanswered
GrowWithTalha posted this in #help-forum
Open in Discord
Hey everyone, I am working on a project with next.js and sanity.io. The problem I am facing is that when I create a new document in sanity and fetch it next.js. In first time the next.js caches the response and every time I do a change in the sanity.io studio or update a document. The next.js always returns the cached response unless I stop the dev server, delete the .next folder and rerun the server. Can anyone has any soloution to stop fetch caching in next.js?

3 Replies