Request memoization (deduping) not working properly #60591
Unanswered
ciza99
asked this question in
App Router
Replies: 1 comment 6 replies
-
Have you tried wrapping your data fetching functions in |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Does anyone else have issues with this? I have created a reproduction repo: https://github.com/ciza99/nextjs-dedup-cache
/products
In my case, I saw up to 4x the amount of a fetch that should be deduped though a single route render pass. With the combination of link preloading, this makes a lot of requests pretty quick. It looks like the issue happens only in a production build.
This is a big issue for me because the CMS I use has a request limit. A site that is rarely visited is racking up requests like crazy. What am I doing wrong? I am passing the Next.js patched fetch function to the
graphql-request
client and the revalidation timing seems to be working otherwise.Beta Was this translation helpful? Give feedback.
All reactions