fetch not being deduped between generateMetadata and page — expected behavior? #86247
-
|
According to the documentation, fetch calls should be Docs: https://nextjs.org/docs/app/api-reference/file-conventions/layout#fetching-data
However, when I use the same fetch call in both generateMetadata and the page component, the network request is made twice instead of being deduped. Minimal reproduction: Is this the intended behavior, or am I missing something? Reproduction steps: Navigate to Posts using the button on the homepage (/). With full URL logging enabled in next.config.js, the server logs show that the same API endpoint is called twice, confirming that the fetch request is not being deduped. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Change the endpoint to https://httpbin.dev/uuid you'll get the same UUID. The logging still happens per fetch call. |
Beta Was this translation helpful? Give feedback.
Change the endpoint to https://httpbin.dev/uuid you'll get the same UUID. The logging still happens per fetch call.