Skip to content

QuizNot attempted

Pick the strategy

An admin changes a product's price and it must show immediately. Which do you use?
1–4 to choose, Enter to submit
Show answer & explanation

Correct answer:

  • Cache the fetch with a tag (cache: 'force-cache', next: { tags: ['product-123'] }) and call revalidateTag('product-123') after the update
  • Tag the cached fetch and call revalidateTag('product-123') after the update: event-driven invalidation is instant and only purges entries with that tag.
  • Not revalidate: 1: still up to a second stale, and regenerates constantly for every visitor.
  • Not revalidate = 3600: up to an hour stale.
  • Not max-age=0 on the page: controls the browser cache, not the Next.js Data/Full Route cache that holds the old price.
  • Use granular tags
  • in Next 16 updateTag() in a Server Action gives read-your-own-writes.