RxJava



rx.operators
Class OperationCache

java.lang.Object
  extended by rx.operators.OperationCache

public class OperationCache
extends java.lang.Object

This method has similar behavior to Observable.replay() except that this auto-subscribes to the source Observable rather than returning a connectable Observable.

This is useful with an Observable that you want to cache responses when you can't control the subscribe/unsubscribe behavior of all the Observers.

NOTE: You sacrifice the ability to unsubscribe from the origin when you use this operator, so be careful not to use this operator on Observables that emit infinite or very large numbers of items, as this will use up memory.


Constructor Summary
OperationCache()
           
 
Method Summary
static
<T> Observable.OnSubscribeFunc<T>
cache(Observable<? extends T> source)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OperationCache

public OperationCache()
Method Detail

cache

public static <T> Observable.OnSubscribeFunc<T> cache(Observable<? extends T> source)