Open
Description
I'd like to collect some metrics on caching for performance optimization and CryptoMaterialsCache currently doesn't provide a way to collect stats such as size, hit, and miss. Could the CryptoMaterialsCache class be wired up to provide something similar to Caffeine or Guava cache such as size() and snapshot()?
Here are some examples:
https://github.com/ben-manes/caffeine/blob/master/caffeine/src/main/java/com/github/benmanes/caffeine/cache/stats/CacheStats.java#L60
https://github.com/google/guava/blob/master/guava/src/com/google/common/cache/LocalCache.java#L4913
https://github.com/google/guava/blob/master/guava/src/com/google/common/cache/AbstractCache.java#L239