From 830c4c996f06b0f5628c4d2839511b17d1197359 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Sat, 5 Mar 2016 09:21:11 +0100 Subject: [PATCH] Update computation of ehcache statistics Previously, the ehcache statistics were computed on the activity of the last minute which gives a "live" overview. All others cache managers, including JCache, provides a "cumulative" metrics (i.e. the hit/miss ratio since the creation of the cache or the last time it got cleared). Ths commit aligns the ehcache statistics to provide a similar semantics as the other cache managers. The side effect is that the metrics are now available, even if there is no cache activity at all at the moment. Closes gh-4891 --- .../boot/actuate/cache/EhCacheStatisticsProvider.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/cache/EhCacheStatisticsProvider.java b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/cache/EhCacheStatisticsProvider.java index 45578677ec..7b960e81b0 100644 --- a/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/cache/EhCacheStatisticsProvider.java +++ b/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/cache/EhCacheStatisticsProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2015 the original author or authors. + * Copyright 2012-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,7 +35,7 @@ public class EhCacheStatisticsProvider implements CacheStatisticsProvider