Repository navigation
[Cache Components]Where is the static shell stored? #88136
Replies: 2 comments
|
On Vercel, cacheHandlers.default is effectively a no-op; it does not persist cached data in process memory. The “static shell” of cached pages is stored by Next.js/Vercel as part of the build output (RSC payload + HTML) on disk/CDN, not in runtime RAM. Revalidation of the static shell follows normal Next.js rules: use ISR or on-demand revalidate via revalidatePath/fetch tags when self-hosting. When self-hosting, cacheHandlers.default is used, but it only keeps values in local process memory unless replaced with a custom adapter. To control or revalidate the static shell, you must rely on Next.js revalidation mechanisms, not the default cache handler. |
|
Good questions — the short version is that the static shell and Where the shell lives (self-hosting):
So for your self-hosting question: no, How the shell revalidates (self-hosting): the normal ISR paths — time-based On Vercel: consistent with the @gnoff quote — Agreed the main docs could state the shell's persistence layer explicitly — right now the clearest documentation of it is, somewhat ironically, the adapter section rather than the caching guides. |
Uh oh!
There was an error while loading. Please reload this page.
According to @gnoff's comment, at least on Vercel,
“use cache”(i.e.,cacheHandlers.default) does not actually cache anything.On the other hand, the static shell is also inherently static, but its persistence layer is not explicitly documented.
cacheHandlers.defaultused?I want to understand the above points accurately and believe the documentation should be updated if necessary.
All reactions