Router cache why not 9999
Unanswered
Siamese Crocodile posted this in #help-forum
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
Why woudlnt I want to do it?
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 Crocodile 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?
If so, users won’t get updates on that page for the duration of the 9999 seconds. Such updates could come in the form of revalidations and new deployments
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