Next.js extend native fetch với caching:
fetch(url)mặc địnhno-storetừ Next.js 15+ (trước đó cache).{ cache: 'force-cache' }để opt-in cache.{ next: { revalidate: 60 } }revalidate sau 60 giây.{ next: { tags: ['posts'] } }tag để invalidate theo tag.
Data cache tách biệt với Full Route Cache.
Next.js extends the native fetch API with caching options:
fetch(url)defaults tono-storefrom Next.js 15+ (it was cached in earlier versions).{ cache: 'force-cache' }opts into caching.{ next: { revalidate: 60 } }revalidates after 60 seconds.{ next: { tags: ['posts'] } }assigns a tag for targeted invalidation.
The Data Cache is separate from the Full Route Cache.