RxJava
rx.operators
Class OperationCache
java.lang.Object
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.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OperationCache
public OperationCache()
cache
public static <T> Observable.OnSubscribeFunc<T> cache(Observable<? extends T> source)