Skip to content
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

Prefetcher is making multiple identical requests are made for the same route #664

Closed
craigsssmith opened this issue Jan 5, 2017 · 0 comments

Comments

@craigsssmith
Copy link
Contributor

Since 2.0.0-beta.13, if your page contains multiple links to the same route (either with or without differences in the parameters) the prefetcher will make multiple requests for that route, all of which of course return identical payloads.

I think the changes to Messenger.send to return a promise might be the cause. (01a1773)

Previously, if multiple calls were made to prefetch with the same URL, each call would complete and PREFETCHED_URLS be updated appropriately before the next call to prefetch executed, so for all subsequent calls, Messenger.send would never be called.

Would it make sense for the values of PREFETCHED_URLS cache to be the promises that Messenger.send returns?

@lock lock bot locked as resolved and limited conversation to collaborators May 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants