Closed GoogleCodeExporter closed 9 years ago
Just for reference, in ehcache v2.7 the following method does not exists as
before, it now returns a new type (StatisticsGateway):
Statistics net.sf.ehcache.Ehcache.getStatistics()
The documentation of ehcache gives names of methods which just don't exists (I
may ask myself why I have tried to read this documentation):
http://ehcache.org/documentation/code-samples#obtaining-statistics-of-cache-hits
-and-misses
The current displayed javadoc is not for the latest version, but for a previous
version:
http://ehcache.org/apidocs/
Of course, the release notes says nothing about this change:
http://www.terracotta.org/confluence/display/release/Ehcache+2.7.0+Release+Notes
We will need to read the source of the
net.sf.ehcache.management.CacheStatistics class (v2.7, attached) in order to
understand how all the methods were renamed in the v2.7 API.
Cool, it was almost easy after all.
Note that the code to change is CacheInformations.java:
https://code.google.com/p/javamelody/source/browse/trunk/javamelody-core/src/mai
n/java/net/bull/javamelody/CacheInformations.java
Original comment by evernat@free.fr
on 17 Mar 2013 at 9:18
Attachments:
It is now fixed in current trunk (revision 3333) and ready for the next release
in about a week (1.44).
I have made a new build from the current trunk and it is available at:
http://javamelody.googlecode.com/files/javamelody-20130324.jar
Note that because of the bug https://jira.terracotta.org/jira/browse/EHC-1010,
the value of the efficiency (hits/access) displayed by javamelody is incorrect
when using ehcache 2.7.0. It is not planned to work around this ehcache 2.7.0
bug in javamelody.
Original comment by evernat@free.fr
on 24 Mar 2013 at 3:55
Original issue reported on code.google.com by
enzo...@gmail.com
on 15 Mar 2013 at 2:39