Next.js · Senior · Question 6 of 75

What do the stale, revalidate and expire parameters in cacheLife mean?

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.

Further reading

Problem with a question

Next.js · Senior · question 6

Test yourself

Take the Next.js · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz