I setup a web cache that works properly. I debugged it and I see in the Ehcache debug log messages that my artifacts are indeed cached.
However, I don't get any statistics about this particular cache - for others I do get them.
Why?
ehcache.xml
Code:
<cache name="imagesCache"
maxElementsInMemory="1000"
eternal="false"
timeToIdleSeconds="120"
timeToLiveSeconds="600"
overflowToDisk="true"
maxElementsOnDisk="100000"
diskPersistent="false"
diskExpiryThreadIntervalSeconds="120"
memoryStoreEvictionPolicy="LRU"
statistics="true" />
web.xml
Code:
<!-- http://ehcache.org/documentation/web_caching.html -->
<filter>
<filter-name>ImagesCachingFilter</filter-name>
<filter-class>net.sf.ehcache.constructs.web.filter.SimplePageCachingFilter</filter-class>
<init-param>
<param-name>suppressStackTraces</param-name>
<param-value>false</param-value>
</init-param>
<init-param>
<param-name>cacheName</param-name>
<param-value>imagesCache</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>ImagesCachingFilter</filter-name>
<url-pattern>/image/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
</filter-mapping>
Cheers,