-
Hi! So I've been using next-intl for quite a bit now and following the development which is absolutely awesome work and brings great functionality that I appreciate greatly. I've been trying to improve the first load of a project using this library so that the first time a user loads the page, it doesn't take 3+ seconds to load, rather keep it in the 1 second range more or less (using Vercel to deploy). However, I've been comparing the same project using this library and a static approach following the examples set by Vercel in the docs (https://beta.nextjs.org/docs/guides/internationalization) The thing is, yes, once cached, the request using next-intl (SSR since SSG isn't supported at this time) and working with the provided info in the docs (https://next-intl-docs.vercel.app/docs/next-13/server-components#cdn-caching) I can indeed cache the request, however, when I attempt to set an I might be missing something here, but I believe that by setting With the SSG version, I get extremely good performance because, well, it's statically generated, so it's expected to be honest. I must be missing something and if anyone has any pointers, it would be much appreciated! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hello @jorgebef! Hmm, that's interesting. Maybe what you're seeing is an example of this: (from the Vercel caching docs) Out of interest: How many requests does your project receive? If there are infrequent requests, maybe the cache is purged earlier? As a side note: SSG is expected to be supported by |
Beta Was this translation helpful? Give feedback.
Yep, that's very much the reason why
next-intl
currently requires SSR, since this allows for a workaround!Unfortunately there's very little information about it:
The React repo also has some tests for it if you search in the code base, but I think that's pretty much it for now!