Next.js Discord

Discord Forum

Router cache why not 9999

Unanswered
Siamese Crocodile posted this in #help-forum
Open in Discord
Siamese CrocodileOP
Hi. I am dynamically rendering an app with a lot of pages that could be static e.g. privacy policy etc.
What could go wrong If I used experimental staleTimes, prefetched privacy policy when user first enters my website and keep it in router cache for like 9999 secs?
Why woudlnt I want to do it?

4 Replies

Siamese CrocodileOP
revalidate tag/path / router.refresh / browser refresh
all of those invalidate router cache
@Siamese Crocodile revalidate tag/path / router.refresh / browser refresh
Yes but revalidate tag/path running in a route handler (think when you send a web hook from your cms to update the page), or a new deployment of your website, don’t invalidate the router cache