Caching¤
Caches the latest value received from a Receiver.
It provides a way to look up the latest value in a stream whenever required, as long as there has been one value received.
LatestValueCache takes a
Receiver as an argument and stores the latest value
received by that receiver. As soon as a value is received, its
has_value method returns True, and
its get method returns the latest value
received. The get method will raise an
exception if called before any messages have been received from the receiver.