Next.js App Router Caching: Explained!
Vercel
@vercelhqAbout
Build, scale, and secure intelligent applications with the AI Cloud.
Latest Posts
Video Description
Learn how to fetch, cache, and revalidate data using the Next.js App Router. 0:00 – Introduction 0:24 – Demo 1:20 – Caching overview 2:06 – Foundations 6:10 – Static: fetch() 7:03 – Dynamic: fetch() without caching 7:37 – Static: unstable_cache() 9:37 – Dynamic: Direct database calls 10:07 – Revalidating static data 12:32 – Revalidating from external sources (webhooks) 14:12 – Revalidating static data with ISR 15:28 – React cache() 16:40 – App Router and Pages Router differences 17:52 – Example: Forms with useFormState & useFormStatus 19:33 – Using forms without JavaScript 19:59 – Exploring the network tab for a Server Action 20:49 – Example: Optimistic UI 21:45 – Preventing navigations with pending mutations 22:34 – Progressive enhancement 23:39 – Partial Prerendering 24:56 – Conclusion ◆ Forms example: https://github.com/vercel/next.js/tree/canary/examples/next-forms ◆ Optimistic UI example: https://github.com/vercel/next.js/tree/canary/examples/with-redis ◆ Docs: https://nextjs.org/docs/app/building-your-application/caching ◆ Deep dive: https://github.com/vercel/next.js/discussions/54075 ◆ Partial Prerendering: https://vercel.com/blog/partial-prerendering-with-next-js-creating-a-new-default-rendering-model #nextjs #react
Boost Your Next.js Performance
AI-recommended products based on this video

Magnetic Nasal Strips Starter Kit: Comfortable Nasal Breathing Support for Sleep, Helps Reduce Snoring Noise, Includes 60 Tabs (30 Uses) with 4 Sizes

Environet Hydroponic Growing Kit, Self-Watering Mason Jar Herb Garden Starter Kit Indoor, Windowsill Herb Garden, Grow Your Own Herbs from Organic Seeds (Basil)

Herb Garden Planter Indoor Kit 21Pcs Kitchen Herb Garden Starter Kit Growing Kit Including Wooden Box Burlap Pots Soil Discs Gardening Tools Unique Easter Birthday Christmas Gift Ideas for Women Mom



















