Next.js · Middle · Question 62 of 75
What does 'use cache: private' allow?
- ✓Correct answer: Caching a function that reads
cookies()orheaders(); the result isn't stored in a server cache across requests - 2Sharing cached data between all users
- 3Storing the cache in a private Redis instance
Explanation
Results can be reused within a request and kept in the browser's router cache for the stale time. Use it for per-user data you want to prefetch.