Skip to content

Confusing semantics between cache(int) and replay(int) #3016

Closed
@dlew

Description

@dlew

It seems misleading that replay(1).refCount() != cache(1), especially when replay().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, whereas replay() has no variant that allows you to hint how large the ReplaySubject 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() reference replay().

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions