Netflix/RxJava — pull request #260 by benjchristensen (2013-05-07 07:35:16+00:00)
Title: Publish, Replay and Cache Operators

Added basic Publish (https://github.com/Netflix/RxJava/issues/15) and Replay (https://github.com/Netflix/RxJava/issues/71) operators to Observable. I have not done any of the overloads (particularly `Replay` which has 10+ in .Net.

I also added a new `Cache` operator as discussed by @johngmyers and I at https://github.com/Netflix/RxJava/pull/209.

Playing with `Replay` and `ConnectableObservable` it does not cater well to the typical use case of needing to just de-dupe calls (cache the responses) so this `Cache` operator can be thought of as an automatic version of `Replay`. It comes with the same risk as `toList` if used with infinite or very large sequences as you can not unsubscribe from it.