Unverified Commit e74a8245 authored by Joseph's avatar Joseph Committed by GitHub
parent cf1f47a5
......@@ -126,6 +126,8 @@ Next.js has a built-in Data Cache that **persists** the result of data fetches a
You can use the [`cache`](#fetch-optionscache) and [`next.revalidate`](#fetch-optionsnextrevalidate) options of `fetch` to configure the caching behavior.
In development mode, `fetch` data is [reused for Hot Module Replacement (HMR)](/app/api-reference/functions/fetch#fetch-default-auto-no-store-and-cache-no-store-not-showing-fresh-data-in-development), and caching options are ignored for [hard refreshes](/app/api-reference/functions/fetch#hard-refresh-and-caching-in-development).
**How the Data Cache Works**
<Image
......
......@@ -92,6 +92,12 @@ By default, the [HMR cache](/docs/app/api-reference/config/next-config-js/server
See the [`serverComponentsHmrCache`](/docs/app/api-reference/config/next-config-js/serverComponentsHmrCache) docs for more information.
### Hard refresh and caching in development
In development mode, if the request includes the `cache-control: no-cache` header, `options.cache`, `options.next.revalidate`, and `options.next.tags` are ignored, and the `fetch` request is served from the source.
Browsers typically include `cache-control: no-cache` when the cache is disabled in developer tools or during a hard refresh.
## Version History
| Version | Changes |
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment