-
Notifications
You must be signed in to change notification settings - Fork 27k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Data fetching could be deduped if already in-flight #19238
Milestone
Comments
Timer
changed the title
Data fetches can be duplicated on canary
Data fetching could be deduped if already in-flight
Nov 18, 2020
x-ref: #14432 |
kodiakhq bot
pushed a commit
that referenced
this issue
Mar 5, 2021
This PR adds request deduplication for `_getServerData`. If a request with the same URL is already in-flight, we don't send another new request. When a request succeeds or fails, we delete the cache. A potential improvement this brings is, when `getServerSideProps` of a new route is slow to load, the user might keep clicking on the link which causes new requests, and the route will never update because results of old requests were ditched. Also adds a test case for this scenario. Closes #19238.
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
This was for a
getServerSideProps
route:We could dedupe this call as an optimization.
The text was updated successfully, but these errors were encountered: