Next.js · Senior · Question 6 of 75
What do the stale, revalidate and expire parameters in cacheLife mean?
- ✓Correct answer: Freshness on the client, background refresh and the full expiration time
- 2Timeouts for the request, the retry and closing the source connection
- 3The entry's lifetime in memory, on disk and in the CDN respectively
Explanation
stale is how long the client uses data without checking the server. After revalidate, the next request gets the cached value and triggers regeneration in the background. After expire without requests, the entry is considered expired, and the next request waits for a new value.