In the Next.js docs, the section on useCache
mentions that the useCache
directive can be used alongside Partial Pre-Rendering:
If used alongside Partial Prerendering, segments that have use cache will be prerendered as part of the static HTML shell.
However, the section on Partial Pre-Rendering mentions nothing about needing to use useCache
. In fact, that section, and the linked video, makes it sound like every component outside of a Suspense
boundary automatically becomes static, i.e. pre-rendered, without the need for useCache
.
Is useCache
needed alongside partial pre-rendering, if so why?