A cache serving updates and new values as “DistinctLatest” and full cache contents upon subscription
问题 I'm trying to implement a cache using a ReplaySubject like follows, but I'm unable to solve the situation using Rx. See code and accompanying tests. The trouble is that the cache drops the newest entries and preserves the oldest. public static class RxExtensions { /// <summary> /// A cache that keeps distinct elements where the elements are replaced by the latest. Upon subscription the subscriber should receive the full cache contents. /// </summary> /// <typeparam name="T">The type of the