Skip to content

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

@craigsssmith

Description

@craigsssmith

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions