I read through the documentation for ehcache 3 and its a bit confusing in the context of spring cache. My configuration is as follows:
<?xml version="1.0" encoding="UTF-8"?>
<ehcache:config updateCheck="true"
monitoring="autodetect"
dynamicConfig="true"
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xmlns:ehcache='http://www.ehcache.org/v3'
xmlns:jsr107='http://www.ehcache.org/v3/jsr107'
xsi:schemaLocation="
http://www.ehcache.org/v3/jsr107 http://www.ehcache.org/schema/ehcache-107-ext-3.0.xsd
http://www.ehcache.org/v3 http://www.ehcache.org/schema/ehcache-core-3.1.xsd">
<ehcache:annotation-driven />
<ehcache:service>
<service>
<jsr107:defaults enable-management="true" enable-statistics="true"/>
</service>
</ehcache:service>
<ehcache:cache alias="xyz" statistics="true">
<ehcache:key-type>java.lang.Long</ehcache:key-type>
<ehcache:value-type>a.b.c.something</ehcache:value-type>
<ehcache:expiry>
<ehcache:ttl unit="seconds">10</ehcache:ttl>
</ehcache:expiry>
<ehcache:resources>
<ehcache:heap unit="entries">10000</ehcache:heap>
<ehcache:offheap unit="MB">1</ehcache:offheap>
</ehcache:resources>
<jsr107:mbeans enable-statistics="true"/>
</ehcache:cache>
...
</ehcache:config>
cache:
jcache:
config: classpath*:ehcache.xml
My yaml:
cache:
jcache:
config: classpath*:ehcache.xml
A bit lost as to what I should be looking for - I thought org.ehcache can be profiled and would show up. I dont see anything with that pattern in jvisualvm. Or not sure how to read the information. Used to be straightforward in ehcache 2.x Any help would be appreciated. I would like to get the size and count of the cache. Number of elements currently in the cache etc.