next.js
ba3ef55f - fix: fetch() behavior when "dynamic" is "force-dynamic (#58484)

Commit
2 years ago
fix: fetch() behavior when "dynamic" is "force-dynamic (#58484) ### What? I changed the behavior of fetch() when 'force-dynamic' is specified in the `dynamic` of Route Segment Config to be similar to when 'force-no-store' is specified in `fetchCache`. ### Why? The document (https://nextjs.org/docs/app/api-reference/file-conventions/route-segment-config#dynamic) contains an explanation that when 'force-dynamic' is specified for `dynamic`, it will behave equivalently to the following: > Setting the segment config to export const fetchCache = 'force-no-store' I tried to correct it because it was not actually behaving this way. ### How? When determining if `fetchCache` is 'force-no-store', I have modified the code to also check the `dynamic` setting. Fixes #47033 Co-authored-by: Zack Tanner <1939140+ztanner@users.noreply.github.com>
Author
Parents
Loading