Next.js Discord

Discord Forum

How to tell next js to never cache anything?

Answered
Dutch posted this in #help-forum
Open in Discord
DutchOP
so i have js app where no page is manually defined, there is only page that fetches data from and based received dynamically generates and responds but next js is caching the request and returns cached version. in dev mode every time i reload the page it returns updated data but in production it kinda cache return the cached data no matter how much time i refresh page. i read the documentation and added the following to { cache: 'no-store' } to every fetch call i make but still in production it returns cached data. the whole website is meant to be dynamic and constantly changing.

2 Replies