Next.js · Middle · Question 69 of 75
With cacheComponents: true, why does export const revalidate = 60 in a page fail?
- ✓Correct answer:
revalidate,dynamicandfetchCachesegment configs are removed with Cache Components; use'use cache'+cacheLife - 2
revalidatemust be a string - 3It works only in layouts
Explanation
Cache Components move caching decisions from the route to individual functions and components, so route-wide flags no longer apply.