on<T extends CacheEvent> method

  1. @override
Stream<T> on<T extends CacheEvent>()
override

Listens for events of Type T and its subtypes.

The method is called like this: myCache.on

If the method is called without a type parameter, the Stream contains every event of this Cache.

The returned Stream is a broadcast stream so multiple subscriptions are allowed.

Implementation

@override
Stream<T> on<T extends CacheEvent>() {
  return StreamGroup.merge([_primary.on<T>(), _secondary.on<T>()]);
}