-
Notifications
You must be signed in to change notification settings - Fork 3.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
[Metadata] Let entries expire in the metadata caches #14154
[Metadata] Let entries expire in the metadata caches #14154
Conversation
- refreshAfterWrite will never expire entries. After the given time, the next request to the entry will trigger a refresh in the background. The current entry will be used until the entry has been refreshed. - documentation for Caffeine's refresh feature: https://github.com/ben-manes/caffeine/wiki/Refresh
@lhotari:Thanks for your contribution. For this PR, do we need to update docs? |
1 similar comment
@lhotari:Thanks for your contribution. For this PR, do we need to update docs? |
@lhotari:Thanks for providing doc info! |
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.
This change makes sense to me.
It will also allow to remove more quickly stale data probably
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.
I think it's better not to increase metadata load, how about
- refresh after
CACHE_REFRESH_TIME_MILLIS
- expire after
CACHE_REFRESH_TIME_MILLIS * 2
@Jason918 thanks, I changed it in this way. PTAL |
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
* [Metadata] Let entries expire in the metadata caches - refreshAfterWrite will never expire entries. After the given time, the next request to the entry will trigger a refresh in the background. The current entry will be used until the entry has been refreshed. - documentation for Caffeine's refresh feature: https://github.com/ben-manes/caffeine/wiki/Refresh * Address review comments
Motivation
refreshAfterWrite
will never expire entries. After the given time, the next request to the entry willtrigger a refresh in the background. The current entry will be used until the entry has been refreshed.
Modifications
CACHE_REFRESH_TIME_MILLIS * 2