title: RxJava - combine concat and merge but check ALL concated observables
body: <p>I'm loading data from multiple sources AND cache them.</p>
  
  <p>What I do is following:</p>
  
  <ul>
  <li>load data from multiple sources</li>
  <li>cache the results in memory</li>
  </ul>
  
  <p>What I want is following:</p>
  
  <ol>
  <li>load all needed data</li>
  <li>concat the results and only propagate the result if ALL data is available</li>
  </ol>
  
  <p>A simple example is following:</p>
  
  <pre><code>mObservable1 = Observable
      .concat(mObservable1Cached, mObservable1)
      .first();
  </code></pre>
  
  <p>How can I combine many caches and not cached observables like in the above example with only 1? That's my idea, but this won't work, as it will propagate a result as soon as 1 of the two observables has a cached data...</p>
  
  <pre><code>mObservable1And2  = Observable
      .concat(
              Observable.merge(mObservable1Cached, mObservable2Cached),
              Observable.merge(mObservable1, mObservable2)
      )
      .first();
  </code></pre>
  
  <p><strong>Observables example</strong></p>
  
  <p><em>Cached data observable</em></p>
  
  <pre><code>mObservable1Cached = Observable.create(new Observable.OnSubscribe&lt;List&lt;Data&gt;&gt;() {
      @Override
      public void call(Subscriber&lt;? super List&lt;Data&gt;&gt; subscriber) {
          subscriber.onNext(mData1Cached);
          subscriber.onCompleted();
      }
  })
          .subscribeOn(HandlerScheduler.from(mBackgroundHandler))
          .observeOn(AndroidSchedulers.mainThread());
  </code></pre>
  
  <p><em>Loading data observable</em></p>
  
  <pre><code>mObservable1 = Observable.create(new Observable.OnSubscribe&lt;List&lt;Data&gt;&gt;() {
          @Override
          public void call(Subscriber&lt;? super List&lt;Data&gt;&gt; subscriber) {
              subscriber.onNext(...load data...);
              subscriber.onCompleted();
          }
      })
      .doOnNext(new Action1&lt;List&lt;Data&gt;&gt;() {
          @Override
          public void call(List&lt;Data&gt; data) {
              mData1Cached = data;
          }
      })
      .subscribeOn(HandlerScheduler.from(mBackgroundHandler))
      .observeOn(AndroidSchedulers.mainThread());
  </code></pre>