Replies: 2 comments 3 replies
-
if you already use the same queryClient, you have to pass
|
Beta Was this translation helpful? Give feedback.
1 reply
-
POC I did example repo |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a nextjs app with a number of pages that do server-side API calls via
getStaticProps
.In there I do around 6
prefetchQuery
per page running in parallel, multiplicated times 10 for different locales. This results in 60 requests happening roughly at the same time for this one page alone and I have quite a few more. Naturally this triggers API rate limits during build which is bad…Now I've been trying to make the calls respect cache time and perform automatic deduplication like frontend would do, but haven't had any luck yet trying different
staleTime
,cacheTime
or other settings.Is there some magic configuration to have them deduplicate automatically? Of course I'm already using the same query client for all similar requests.
Beta Was this translation helpful? Give feedback.
All reactions