-
-
Notifications
You must be signed in to change notification settings - Fork 233
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Full Route Cache not working #595
Comments
I will close this one. It seems that Full Route Cache is not working as expected in latest version of Next.js. I will investigate further and create an issue in Next.js repo instead. Cheers 🎉 |
Thanks! Can you link to the Next.js issue here after you've created it for reference? I've upgraded https://next-intl-example-next-13.vercel.app/ to Next.js 14.0.1 yesterday and as far as I can tell, there's been no regression. |
I was not sure it is actually an issue or feature request, so I created a discussion: vercel/next.js#57961 Supposably I've already solved the issue by using Caddy server in front of Next.js app and modifying |
@amannn UPDATE: Turns out it is undocumented and possibly unexpected behaviour in Next.js – details tldr; To enable Full Route Cache for dynamic segments, you need to export dummy export async function generateStaticParams() {
return [];
} If you do, page is market as Cheers 🎉 |
Another UPDATE: I am afraid I need to reopen the issue. After enabling SSG with
The reason is here:
And not limited to next-intl/packages/next-intl/src/navigation/react-server/createLocalizedPathnamesNavigation.tsx Line 29 in 549dc17
I was wondering if it would be possible to rely solely on @amannn 🙏 |
After some investigation I found out that if I call |
I must close the issue again. I have traced down the issue and it's not The problem was caused by It seems that Sorry for the trouble and thanks for library! When I finish with some of my projects, I will definitely contribute to this awesome lib. Cheers! |
Description
I've noticed that adding
NextIntlClientProvider
disables Full Route Cache.This made my app performance drop from
~300req/s
to~10req/s
on single instance which is a real deal when it comes to costs.Mandatory reproduction URL (CodeSandbox or GitHub repository)
https://codesandbox.io/p/sandbox/next-intl-bug-template-forked-yow8ep
Reproduction description
Use
NextIntlClientProvider
inlayout.tsx
Expected behaviour
Ideally,
NextIntlClientProvider
would not disableFull Route Cache
Next.js docs provide a list of conditions to be opted-out from Full Route Cache: https://nextjs.org/docs/app/building-your-application/caching#opting-out-2
The text was updated successfully, but these errors were encountered: