-
Notifications
You must be signed in to change notification settings - Fork 7.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Confusing semantics between cache(int) and replay(int) #3016
Comments
I agree that caching a limited number of elements using For example:
prints
compared to
which results in
|
That's interesting; I didn't know that |
If the upstream terminates, all subscribers go away and I'm proposing the |
I hope this problem has been clarified via the javadoc and the new autoConnect operator in release 1.0.14. |
It seems misleading that
replay(1).refCount()
!=cache(1)
, especially whenreplay().refCount()
==cache()
.It's especially odd because each one cannot mimic the behavior of the other -
cache()
has no variant that limits the number of items to replay, whereasreplay()
has no variant that allows you to hint how large theReplaySubject
should be.I see that this has been covered before (#1591, #2913), but I still feel like something could be done to clear up the matter. Not exactly sure what - maybe all it'd take is not having the javadoc for
cache()
referencereplay()
.The text was updated successfully, but these errors were encountered: