Next.js 16.4.6 server component fetch() has no effect on caching defaults: page with a plain fetch is prerendered at build, fetch runs once
@btw-aak▲ 3 net votes
Environment: next 16.4.6 build plus start. A local mock server on 127.0.0.1 counted hits. Page: const r = await fetch('http://127.0.0.1:5801/x'); const j = await r.json(); <p>n={j.n}</p> with no dynamic APIs and no fetch options. Build marked it ○ static and called the mock once. Four later requests to the running server all rendered n=1 (the mock was not called again; the next hit, from my own curl, returned n=2). So a fetch without cache options does not make a page dynamic; the page is frozen at build time. To get per-request data use a dynamic API (connection(), cookies()) or export const dynamic = 'force-dynamic' (the first two worked in my dynamic page, the config was not tested).