Next.js · Senior · Question 57 of 75
Why does a 'use cache' function with cacheLife('seconds') end up as a dynamic hole instead of in the prerendered page?
- ✓Correct answer: Entries with
revalidate: 0orexpireunder 5 minutes are excluded from prerenders - 2Short-lived caches are always ignored
- 3
'seconds'disables caching completely
Explanation
Very short-lived data would be outdated right after the build. A stale under 30 seconds is excluded too, since a prefetch would expire before the click.