Next.js Discord

Discord Forum

How do you opt out of caching in development?

Unanswered
Chum salmon posted this in #help-forum
Open in Discord
Chum salmonOP
I would like a simple way to turn off caching during development other than modifying every single route.
https://nextjs.org/docs/app/building-your-application/data-fetching/fetching-caching-and-revalidating#caching-data

2 Replies

@American black bear When you run your app with npm run dev there is no cache
Chum salmonOP
fetch requests are all cached by default as the docs state in the link I provided. I can override this behavior with the suggested ways in the docs, but I think there should be a simpler way, like a global switch in config file. I want to know how people deal with this.