Register Caffeine Cache in Spring Actuator (CacheManager)
问题 We're using Spring Boot 2 and Spring Actuator. When creating a cache like the following: @Bean public CaffeineCache someCache() { return new CaffeineCache("my-cache", Caffeine.newBuilder() .maximumSize(1000) .expireAfterWrite(10, TimeUnit.SECONDS) .build()); } it is registered into Spring Actuator and can be accessed and handle via endpoints: ❯ http GET localhost:8080/actuator/caches { "cacheManagers": { "cacheManager": { "caches": { "my-cache": { "target": "com.github.benmanes.caffeine.cache