Next.js Discord

Discord Forum

Unstable cache

Answered
Siamese Crocodile posted this in #help-forum
Open in Discord
Siamese CrocodileOP
Hi. How does unstable cache work in case of dynamic rendering? Does it still apply if I make the cache infinite?
Answered by B33fb0n3
Then your database will be fetched once and will stay infinite in your cache. It will be read everytime from your cache
View full answer

5 Replies

@Siamese Crocodile Hi. How does unstable cache work in case of dynamic rendering? Does it still apply if I make the cache infinite?
It just caches normally. The part that is cached is not rerun, but the page itself is still rerun every request.

Yes it still applies. So you can use this to make static regions in a dynamic page.
@Siamese Crocodile Hi. How does unstable cache work in case of dynamic rendering? Does it still apply if I make the cache infinite?
Then your database will be fetched once and will stay infinite in your cache. It will be read everytime from your cache
Answer
Siamese CrocodileOP
Sure thanks, I'll have to investigate my code then 😄