title: Unable to get stats for Caffeine cache (Spring 5)
body: <p>I got stuck on a (hopefully) very simple problem. I added a Caffeine cache to my Spring application and this cache works well.
  Now I tried to get the statistics for this cache, but I can't find a way to get to the right methods...</p>
  <pre><code>import com.github.benmanes.caffeine.cache.Caffeine;
  import org.springframework.cache.CacheManager;
  import org.springframework.cache.annotation.EnableCaching;
  import org.springframework.cache.caffeine.CaffeineCacheManager;
  import org.springframework.context.annotation.Bean;
  import org.springframework.context.annotation.Configuration;
  
  import java.util.concurrent.TimeUnit;
  
  @Configuration
  @EnableCaching
  public class CachingConfig {
  
      @Bean
      public CacheManager cacheManager() {
          CaffeineCacheManager cacheManager = new CaffeineCacheManager(&quot;bin&quot;);
          cacheManager.setCaffeine(Caffeine.newBuilder()
                  .maximumSize(10000)
                  .expireAfterWrite(1, TimeUnit.DAYS)
                  .recordStats());
          return cacheManager;
      }
  
  }
  </code></pre>
  <p>How can I get stats for this cache?</p>