Cache last emitted item RxJava Operator
rx-java
Solution
Yes. but in a 3rd party library called ReplayingShare. Here is the link: https://github.com/JakeWharton/RxReplayingShare
Compare to `.replay(1).autoConnect()` It can disconnect from upstream if there are no subscriber at downstream.
Compare to `.replay(1).refCount()`It can also cache the last value even you've already disconnected from it.
Also, if upstream ended (no matter which you use `refCount`/`autoConnect`), you won't get your replay for next subscriber. But with ReplayingShare you will always get your last item cache.
Problem
Is there an operator that caches the last emitted item and passes it to every new subscriber? In other words, an operator that makes an observable to behave like a `BehaviorSubject`?