Next.js Discord

Discord Forum

Reduce cache

Unanswered
West African Lion posted this in #help-forum
Open in Discord
West African LionOP
Hi friends,

We have written a NextJS app but are experiencing bug reports from testers, which turn out only to be browser-cache related.

So we are trying to make sure that page requests only cache for a max of 5 minutes. (Before we go live and get similar reports from actual users!) We are doing continuous delivery so really need for the cache to be less than 365 days! Literally we just want to set cache to something like no-store no-cache max-age=300 for all routes.

Research (https://github.com/vercel/next.js/issues/22319) seems to indicate that NextJS will not allow this, but I cannot believe that this is correct. Is there a way to do this?

0 Replies