Skip to content

Commit 18ff5af

Browse files
akarnokdakarnokd
akarnokd
authored andcommitted
cache now supports backpressure
1 parent 0caeea8 commit 18ff5af

File tree

7 files changed

+871
-242
lines changed

7 files changed

+871
-242
lines changed

src/main/java/rx/Observable.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3504,7 +3504,7 @@ public final <B> Observable<List<T>> buffer(Observable<B> boundary, int initialC
35043504
* @see <a href="http://reactivex.io/documentation/operators/replay.html">ReactiveX operators documentation: Replay</a>
35053505
*/
35063506
public final Observable<T> cache() {
3507-
return create(new OnSubscribeCache<T>(this));
3507+
return CachedObservable.from(this);
35083508
}
35093509

35103510
/**
@@ -3539,7 +3539,7 @@ public final Observable<T> cache() {
35393539
* @see <a href="http://reactivex.io/documentation/operators/replay.html">ReactiveX operators documentation: Replay</a>
35403540
*/
35413541
public final Observable<T> cache(int capacity) {
3542-
return create(new OnSubscribeCache<T>(this, capacity));
3542+
return CachedObservable.from(this, capacity);
35433543
}
35443544

35453545
/**

src/main/java/rx/internal/operators/OnSubscribeCache.java

Lines changed: 0 additions & 76 deletions
This file was deleted.

0 commit comments

Comments
 (0)