-
Notifications
You must be signed in to change notification settings - Fork 16
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
Introduce LoadingStrategy.CacheOnly #48
Conversation
Can you pls describe the use case for this loading mode? Specifically why LazyReload can't be used here - it wouldn't reload the data if storage cache is present. Once the data is in storage, it would effectively work as CacheOnly, and the state with complete absence of storage and mem cache is rather an edge case |
In my situation the use case is that I take the data from one DoD, and based on this data I decide if I need to fetch data from another DoD.
The thing is that when
|
First of all flatMapping DODs in that manner is wrong: the subscriber will end up with a composed stream consisting of Observables produced by every emission of the featureEnabledDod. The safest option is to switchMap the upstream that filters out emissions untilLoaded, i.e. it will switchMap exactly once. But that would yield a delay in the subscriber receiving any values though. But I think the root problem here is the underlying need for one DOD to depend on another and keep emissions following DOD contract for the subscriber. |
You are talking here about I see your point. |
It will allow to take data only from cache, without making network request