cshannon opened a new pull request, #3206: URL: https://github.com/apache/accumulo/pull/3206
[Caffeine](https://github.com/ben-manes/caffeine) is the replacement for the Guava cache api and has several improvements including efficiency with its admission [policy](https://github.com/ben-manes/caffeine/wiki/Efficiency) and [performance](https://github.com/ben-manes/caffeine/wiki/Benchmarks). Currently the Accumulo code base has a mixture where some places use Guava and some places use Caffeine so it is not consistent. Switching to Caffeine is nearly a drop in replacement and this commit replaces all instances of Guava with Caffeine for consistency and also adds a checkstyle rule to prevent using Guava in the future. From the Guava [docs](https://guava.dev/releases/31.1-jre/api/docs/com/google/common/cache/CacheBuilder.html) regarding Caffeine: > **Prefer [Caffeine](https://github.com/ben-manes/caffeine/wiki) over Guava's caching API** **The successor to Guava's caching API is [Caffeine](https://github.com/ben-manes/caffeine/wiki). Its API is designed to make it a nearly drop-in replacement** -- though it requires Java 8 APIs, is not available for Android or GWT/j2cl, and may have [different (usually better) behavior](https://github.com/ben-manes/caffeine/wiki/Guava) when multiple threads attempt concurrent mutations. Its equivalent to CacheBuilder is its [Caffeine](https://www.javadoc.io/doc/com.github.ben-manes.caffeine/caffeine/latest/com.github.benmanes.caffeine/com/github/benmanes/caffeine/cache/Caffeine.html) class. **Caffeine offers better performance, more features (including asynchronous loading), and fewer [bugs](https://github.com/google/guava/issues?q=is%3Aopen+is%3Aissue+label%3Apackage%3Dcache+label%3Atype%3Ddefect).** -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
