EHC ❯ Statistics values inverted in ehcache 2.7.0
-
Bug
-
Status: Resolved
-
2 Major
-
Resolution: Fixed
-
-
-
cschanck
-
Reporter: evernat
-
March 24, 2013
-
0
-
Watchers: 3
-
June 06, 2013
-
April 03, 2013
Description
Since v2.7.0, methods names in ehcache statistics have been renamed, even if I have not seen this written in the release notes.
The source of the net.sf.ehcache.management.CacheStatistics class has been changed accordingly. Except that some incorrect methods were used to implement 2 methods in this class.
I think that the following code, in net.sf.ehcache.management.CacheStatistics (v2.7.0), is incorrect:
public long getCacheMisses() {
return statistics.cacheHitCount();
}
/** {@inheritDoc} */
public long getInMemoryMisses() {
return statistics.cacheMissCount();
}
and that both methods should be rewritten as:
public long getCacheMisses() {
return statistics.cacheMissCount();
}
/** {@inheritDoc} */
public long getInMemoryMisses() {
return statistics.localHeapMissCount();
}
This was a pair of typos, screwed up in the stats rewrite.