title: Create an IObservable and return the result of a cached async operation immediately
body: <p>I'm using reactive extensions to call a async method and I want to cache the result and return this for subsequent calls to the method.</p>
  
  <p>How can I create an Observable instance, return it and provided the data (cacheResult) the subscribe requires?</p>
  
  <pre><code>public IObservable&lt;Bar&gt; GetBars(int pageIndex, int pageSize)
  {
     var @params = new object[] { pageIndex, pageSize };
     var cachedResult = _cache.Get(@params);
     if (cachedResult != null)
     {
   // How do I create a Observable instance and return the 'cacheResult'...
   return ...
     }
  
     var observable = new BaseObservable&lt;Bar&gt;();
     _components.WithSsoToken(_configuration.SsoToken)
        .Get(@params)
        .Select(Map)
        .Subscribe(c =&gt;
                       {
                            _cache.Add(@params, c);
                            observable.Publish(c);
                            observable.Completed();
                       }, exception =&gt;
                       {
                          observable.Failed(exception);
                          observable.Completed();
                       });
  
         return observable;
  }
  </code></pre>