2

In the metrics endpoint I get all the caches size, but not hit/miss (as expected from https://docs.spring.io/spring-boot/docs/current/reference/html/production-ready-metrics.html#production-ready-datasource-cache)

Example: "cache.mytest.size":19

I expected also the hit/miss counters... I'm using Guava.

Leo
  • 1,066
  • 1
  • 6
  • 19

1 Answers1

3

Had to enable them on a per-cache basis:

https://github.com/google/guava/wiki/CachesExplained#statistics

cacheBuilder.recordStats();
Leo
  • 1,066
  • 1
  • 6
  • 19