title: How to create caching/hot version of rx.Single?
body: <p>The RxJava <a href="https://github.com/ReactiveX/RxJava/releases/tag/v1.0.13">v1.0.13</a> introduced new type of an Observable: <strong>rx.Single</strong>. It fits great the request-response model but lacks the standard side-effects introducing operators like doOnNext(). So, it's much harder to make multiple things happen as a result.</p>
  
  <p>My idea was to replace doOnNext() with multiple subscriptions to the same Single instance. But this can cause the underlaying work to be done multiple times: once per every subscription.</p>
  
  <p>Example rx.Single implementation:</p>
  
  <pre><code>private class WorkerSubscribe&lt;SomeData&gt;() : Single.OnSubscribe&lt;SomeData&gt; {
      override fun call(sub: SingleSubscriber&lt;in SomeData&gt;) {
          try {
              val result = fetchSomeData()
              sub.onSuccess(result)
          } catch(t: Throwable) {
              sub.onError(t)
          }
      }
  }
  
  val single = Single.create&lt;SomeData&gt;(WorkerSubscribe())
  </code></pre>
  
  <p>Usage:</p>
  
  <pre><code>single.subscribe({}, {})
  single.subscribe({}, {})   // Data is fetched for the second time
  </code></pre>
  
  <p>Is it possible to create a instance of Single that will not fetchSomeData() multiple times even when single.subscribe() is called multiple times, but cache and return the same result?</p>