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
Polish Mono cache operators documentation #2790
Conversation
This commit polishes the javadoc of most cache variants in Mono: - explicit the behavior in case of concurrent subscriptions for `cache()`, `cache(Duration)` and `cache(Function)` - polish (un)ordered lists and paragraph breaks in `cacheInvalidateIf` and `cacheInvalidateWhen` javadoc. Fixes #2782.
cc @jzheaux for |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM with some minor wording suggestions
* Cache loading (ie. subscription to the source) can happen either at the very | ||
* first subscription or after the cache has been cleared due to expiry. | ||
* Once that upstream subscription is started, it cannot be cancelled. | ||
* The operator will however prevent multiple concurrent subscriptions from triggering | ||
* duplicated loading (only one load-triggering subscription can win at a time, | ||
* and the others will get notified of the newly cached value when it arrives). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about the following:
* Cache loading (ie. subscription to the source) can happen either at the very | |
* first subscription or after the cache has been cleared due to expiry. | |
* Once that upstream subscription is started, it cannot be cancelled. | |
* The operator will however prevent multiple concurrent subscriptions from triggering | |
* duplicated loading (only one load-triggering subscription can win at a time, | |
* and the others will get notified of the newly cached value when it arrives). | |
* Cache loading (ie. subscription to the source) is triggered by the very | |
* first subscription to empty or expired cache. | |
* Once the cache loading is started, it cannot be cancelled. | |
* The operator guarantees that only a single cash loading may happen at a time | |
* (only one load-triggering subscription can win at a time, | |
* and the others will get notified of the newly cached value when it arrives). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same should be applied to the following similar changes if makes sence
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good suggestion. I actually took inspiration and reworded and simplified these sections even further in the last commit, let me know what you think
@simonbasle Perfecto 👌. |
This commit polishes the javadoc of most cache variants in Mono:
cache()
,cache(Duration)
andcache(Function)
cacheInvalidateIf
and
cacheInvalidateWhen
javadoc.Fixes #2782.