-
Notifications
You must be signed in to change notification settings - Fork 10
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
Deprecate CaffeineCacheStats.registerCache #2003
base: develop
Are you sure you want to change the base?
Conversation
Generate changelog in
|
tritium-caffeine/src/main/java/com/palantir/tritium/metrics/caffeine/CaffeineCacheStats.java
Outdated
Show resolved
Hide resolved
How widely is this API still used? How many of those repos compile with |
I discussed this in the PR description:
I count 575 callsites internally: https://pl.ntr/2ok. This deprecation would only affect repos that have Personally I think |
…ffeine/CaffeineCacheStats.java Co-authored-by: David Schlosnagle <[email protected]>
Before this PR
We added an improved mechanism for registering stats on a cache in #1897, with a few FLUPs (linked at the bottom of that PR). The new method is also documented in the tritium README here.
However, existing code is still using the old mechanism, and callers who forgot to call
.recordStats()
are still being found (we noticed several this week).After this PR
==COMMIT_MSG==
Deprecate CaffeineCacheStats.registerCache
==COMMIT_MSG==
By marking this method as deprecated, we nudge developers who see these warnings in their IDE towards the preferred pattern.
Possible downsides?
Repos that have opted into making deprecations fail builds and are using these now-deprecated methods won't be able to take the upgrade automatically. However, this something those repos have opted into and should expect as a result of that choice.