The replay operator is added to all the flowable streams in the library.
return flowable
.replay(1)
.autoConnect();
This creates certain issues while using them.
It is difficult to differentiate between live events and cached ones. For example, if we subscribe to Camera.CaptureInfo at some point in time, the last data point gets sent even if the photo may have been taken 10 minutes ago.
If someone is using LiveData on Android, which does its own caching, the caching on the library side further creates some unexpected behaviour.
Yes, the replay is useful under certain situations, but it requires tricky workarounds to invalidate it downstream once its added. Therefore, I feel that simply returning the flowable without the replay is good enough, and the library should let the user implement the caching on his/her own.
The replay operator is added to all the flowable streams in the library.
This creates certain issues while using them.
It is difficult to differentiate between live events and cached ones. For example, if we subscribe to Camera.CaptureInfo at some point in time, the last data point gets sent even if the photo may have been taken 10 minutes ago.
If someone is using LiveData on Android, which does its own caching, the caching on the library side further creates some unexpected behaviour.
Yes, the replay is useful under certain situations, but it requires tricky workarounds to invalidate it downstream once its added. Therefore, I feel that simply returning the flowable without the replay is good enough, and the library should let the user implement the caching on his/her own.
Any thoughts?