Replies: 3 comments 4 replies
-
|
You may not need Why did you put If your page is nothing but JSX, aka content that won't ever change, you might not need I'd like to know a bit more though. |
Beta Was this translation helpful? Give feedback.
-
|
In Next.js 16, when cacheComponents: true is enabled, the framework caches the React component tree (layouts, pages, and server components) between requests — but it still runs the component initialization logic on the server once per cache entry. That means even if your route is marked as static during build (e.g. "use cache" + dynamic = "force-static"), Next.js will still load and evaluate the cached component tree on the server when it’s first requested or when the cache is invalidated. Why you’re seeing CPU usage now (but not before):
|
Beta Was this translation helpful? Give feedback.
-
|
I was wondering whether it would make sense to support a mode where fully static routes (e.g., dynamic = "force-static" + "use cache") could be served purely from the CDN layer with zero server CPU usage — similar to prebuilt SSG output in older versions. Would it make sense to open this as a feature request for the Next.js team, or is there already something planned in that direction on Vercel’s side? Totally understand if this behavior is intentional due to the new caching model — just curious if there’s a roadmap item or design consideration for this case. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
So before I migrate to Nextjs 16 with
cacheComponents: true, my nextjs 15 withdynamic = force-staticroutes are build and worked as a static that means no CPU usage in vercel dashboard. But after I upgraded to 16 withcacheComponents: true, those routes are kept using CPU through Vercel dashboard even though I added "use cache" for bothpage.tsxandlayout.tsxof those routes and build said those routes are static. I am looking for how I can make the routes to SSG or pure CSR without CPU usage with cache components.Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions