Next.js Discord

Discord Forum

next-intl cache

Answered
MarkMiklos posted this in #help-forum
Open in Discord
Does next-intl disables all cache as it makes your application dynamic because of the [locale] route group?

I came across that whenever I use it, it does make my requests auto no cache

I couldn't find any helpful documentation on this specific question.
Answered by American Crow
Dude you wrote cache I somehow read it as opts out of static rendering. I'm so sorry for confusing you. It does not opt out of any nextjs caching. The rest I wrote above is still true
View full answer

6 Replies

🆙
American Crow
Using next intl does make your app dynamic by default. But not because of the [locale] rather because of headers being used on each page/request. However you can still opt into static rendering with next-intl by using unstable_setRequestLocale https://next-intl-docs.vercel.app/docs/getting-started/app-router#static-rendering
according to the docs installation turns out it does cache requests, so im confused now 😄
my cache "issue" was because of cookies that i need to send for each request to my backend
American Crow
Dude you wrote cache I somehow read it as opts out of static rendering. I'm so sorry for confusing you. It does not opt out of any nextjs caching. The rest I wrote above is still true
Answer
Ohh that's alright 😄 no worries thanks, actually the thing you wrote is helpful, haven't taught about that yet 😄