You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
That is just one example of sensibly returning the same Promise for different calls of a store.query.
This cannot be used with Pagination however, because Pagination (line 365 - 369) will blindly cancel a previous request, if it is not fulfilled yet, on refresh. The solution is to replace
Pagination.renderArray should not blindly cancel pending requests, but only if they are different from a new request.
We have code that "guards" remote requests against requesting the same information more than once concurrently (https://code.google.com/p/ppwcode/source/browse/javascript/util/oddsAndEnds/trunk/src/oddsAndEnds/promise/Arbiter.js). When "data" is asked, we check whether the "request" is the same or not, and if it is, and the request is still pending, we return the same Promise. That original Promise will later resolve for all callers of that "data".
That is just one example of sensibly returning the same Promise for different calls of a store.query.
This cannot be used with Pagination however, because Pagination (line 365 - 369) will blindly cancel a previous request, if it is not fulfilled yet, on refresh. The solution is to replace
with
This seems better in all cases.
The text was updated successfully, but these errors were encountered: