-
Notifications
You must be signed in to change notification settings - Fork 3k
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
.cache() requeries API #1417
Comments
Ok, in addition to that, when I have a second service, taking the ModelStream and querying additional information for the contents of the observable and cache an observable of a data structure like this: export class dataStructure
{
constructor(public model : Model, public information : Observable<secondModel>){}
} I get cascading updates resulting in an endless loop. The root of the loop is the |
Ok, I found the issue with the cascading updates: private getParameters() : Observable<ParameterObservableArray>
{
return this.plantService.PlantStream
.map<ParameterObservableArray>(plant => {
return new ParameterObservableArray(
plant,
this.getParametersOfPlant(plant).cache() //the .cache() was missing
);
});
} I had to cache the subqueries too (so now I have a global variable that stores But I still have the requering (that is not that bad, but I don't think it should be there) |
OK, I made a third service, adding additional information to the additional information of the second service (thus creating a meta-meta-stream) and I get the aborted requeries there as well. So only the one in the middle doesnt do so |
@SuperManitu do you have an isolated repro example (in plunkr, jsbin, esbin, etc.) we can see and run? That'll help us determine whether there's a bug in Rx or if you need to something differently. |
I tried here: https://plnkr.co/edit/0nw7hDqtSRjycBmNcV6X?p=preview |
https://plnkr.co/edit/0nw7hDqtSRjycBmNcV6X?p=preview |
I found my issue, I had a get property that was taking the stored Observable and transforms it like this: |
@SuperManitu We're going to need code that can reproduce this issue that is actually using the latest version of RxJS 5. From your plunker, this appears to be some version of RxJS 5 that is associated to Angular 2 beta.0... I'm not sure how stale that is, but it's probably several versions behind. |
Since I can't reproduce this in current versions of RxJS 5. I'm not sure what course of action to take here. I'm going to close this for now, @SuperManitu. If you can come up with minimal code that reproduces this in RxJS 5.0.0-beta.2, then please do reopen, as we'd definitely want to fix it ASAP. |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
This is my reopening of the issue #1405
My main issue is gone with saving
getStuff().cache()
to a local is gone, but I still get aborted requeries of the API, that should not be thrown because the code is in thegetStuff()
method.Here is a screenshot of Chrome's network tab: http://qs.lc/sb5k0 (plants is the URL)
I have no idea, why they are aborted and I have no idea why they are queried at all.
Thanks.
The text was updated successfully, but these errors were encountered: