Skip to content
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

Fix confusing Javadoc of memoizeWithExpiration #5812

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

MartinSpiessl
Copy link

The previous wording could be read such that the cache is cleared in
the background once the expiration time is reached. However this is
not the case, so we simply remove the following part of the Javadoc:
"and removes the cached value after the specified time has passed"
The rest of the Javadoc already accurately describes the behavior,
though the part with "After the expiration time" could again be
misinterpreted, so we rewrite this to clarify that things only
happen once the "get" method is called.

The previous wording could be read such that the cache is cleared in
the background once the expiration time is reached. However this is
not the case, so we simply remove the following part of the Javadoc:
"and removes the cached value after the specified time has passed"
The rest of the Javadoc already accurately describes the behavior,
though the part with "After the expiration time" could again be
misinterpreted, so we rewrite this to clarify that things only
happen once the "get" method is called.
@google-cla google-cla bot added the cla: no label Dec 6, 2021
@MartinSpiessl
Copy link
Author

Sure, submitted my Contributor License Agreement a minute ago.

@MartinSpiessl
Copy link
Author

It says I should request a rescan regarding CLA from a repository manager. I assume the person who does the releases is for sure one of the a repository managers, so that would be @cpovirk.

@google-cla google-cla bot added cla: yes and removed cla: no labels Dec 6, 2021
@cpovirk
Copy link
Member

cpovirk commented Dec 6, 2021

This is indeed a common cause of confusion.

It would still be good for the first sentence to say something about the expiration. Maybe use the original phrasing but with "removes" changed to "invalidates?" But even that may be misleading, given that Cache.invalidate uses that word for immediate removal (I think). Other ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants