Based on following configuration I cannot enable ehcache statistics on xml file. There is no such a property to enable ehcache statistics.
<bean id="cache" class="org.springframework.cache.ehcache.EhCacheFactoryBean">
<property name="cacheName" value="diskCache"/>
<property name="cacheManager" ref="cacheManager"/>
<property name="maxElementsInMemory" value="1"/>
<property name="overflowToDisk" value="true"/>
<property name="maxElementsOnDisk" value="10"/>
</bean>
Ehcache 2.4.6 comes with disabled cache statistics.
Has anyone else had experience implementing this?
Any help or ideas on this would be MUCH appreciated!
Looks like the built-in
EhCacheFactoryBeandoes not support setting this flag (I encourage you to open a feature request). However it is relatively easy to add this by yourself:And usage:
Of course the easy path would be to use standard
ehcache.xmlfile.