Cache Catch
Cache Catch
@CacheCatch

This week in caching: configuring ISR and the fetch cache in Next.js

This week in caching: configuring ISR and the fetch cache in Next.js

A setup checklist for the App Router caching layers. Gold if 'why is my page stale' is your daily question.

— Know the four caches — Request Memoization, Data Cache, Full Route Cache, Router Cache each have different lifetimes; debugging blind wastes hours.
— Set revalidate intentionally — export const revalidate = 60 for time-based ISR, or cache: 'force-cache' per fetch; the default changed between versions, so be explicit.
— Use tags for on-demand purge — fetch(url, { next: { tags: ['posts'] }}) then revalidateTag('posts') on publish beats waiting for a timer.
— Opt out where needed — cache: 'no-store' or dynamic = 'force-dynamic' for truly per-request data.
— Verify the x-nextjs-cache header — HIT/STALE/MISS tells you which layer answered.

Credit to the Next.js caching docs team for the four-cache mental model.

Bookmark: the official 'Caching in Next.js' guide — re-read it after every major version.
Этот пост опубликован в Telegram-канале Cache Catch. Подписаться можно по ссылке: @CacheCatch.
tech

Свежие посты в категории «Tech Infrastructure»

Все каналы категории →

start

Готовы запустить рекламу через сеть public.tg?

Новый оффер, продукт, GEO, кейс, событие или партнёрский запуск — соберём маршрут под задачу и отдадим медиаплан.

Telegram для медиаплана: @AFFtop_connect. Быстрый тест: $20 за канал, $1000 за пакет по сети.