You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: add missing links and imports to cacheLife and cacheTag for prerender-missing-suspense error (#79247)
One of the important resources for this message is `cacheLife` and
`cacheTag`, but the links were missing, and the snippet omitted imports,
which newcomers won't know how to import unless looking up.
// This cache can be revalidated by webhook or server action
@@ -212,13 +215,15 @@ Alternatively you can add a Suspense boundary above the component that is access
212
215
213
216
### Short-lived Caches
214
217
215
-
`"use cache"` allows you to describe a `cacheLife()` that might be too short to be practical to prerender. The utility of doing this is that it can still describe a non-zero caching time for the client router cache to reuse the cache entry in the browser and it can also be useful for protecting upstream APIs while experiencing high request traffic.
218
+
`"use cache"` allows you to describe a [`cacheLife()`](/docs/app/api-reference/functions/cacheLife) that might be too short to be practical to prerender. The utility of doing this is that it can still describe a non-zero caching time for the client router cache to reuse the cache entry in the browser and it can also be useful for protecting upstream APIs while experiencing high request traffic.
216
219
217
220
If you expected the `"use cache"` entry to be prerenderable try describing a slightly longer `cacheLife()`.
0 commit comments