Lesson 3.2

Caching and revalidation

Caching is the part people get burned by. Know what layer holds your data, how long it holds it, and which lever invalidates it.

25mIntermediate11,643 students
Video thumbnail for Caching and revalidation

Sign in to watch this lesson

Browsing is free. Create an account to play videos and track your progress.

Overview

Caching is the part people get burned by. Know what layer holds your data, how long it holds it, and which lever invalidates it.

What this lesson covers

  • Distinguish request-level caching from the full route cache
  • Revalidate on a timer or on demand by tag
  • Opt out deliberately when data must always be fresh

This lesson sits in Data Fetching and Caching, part of Next.js App Router in Depth. It assumes what came before it and leads directly into the next lesson in the module.

In this lesson you will:

  • Distinguish request-level caching from the full route cache
  • Revalidate on a timer or on demand by tag
  • Opt out deliberately when data must always be fresh

Pro Tip

Tag your reads by content type; then one webhook can invalidate exactly the pages that changed.