Next.js · Middle · Question 4 of 75

How does updateTag differ from revalidateTag in Next.js 16?

Explanation

updateTag is available only in Server Actions: the user who changed the data sees the changes immediately. revalidateTag(tag, 'max') marks data as stale: visitors see the old version while the new one is prepared in the background - good for blogs and catalogs. In Next.js 16, revalidateTag requires a second argument - a cacheLife profile.

Further reading

Problem with a question

Next.js · Middle · question 4

Test yourself

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

Take this quiz