I want to use Ehcache dynamic configuration in version 3.
As seen in the doc here https://www.ehcache.org/documentation/2.8/configuration/configuration.html#ehcache.xsd
since Ehcache 2.0, certain cache configuration parameters can be modified dynamically at runtime
This is simply done in ehcache v2 by setting the <ehcache>
element’s dynamicConfig attribute to “true” in the ehcache.xml configuration file.
Now I'd like to know how to do that in ecache v3, since there is no <ehcache>
element in v3, so the dynamicConfig attribute is nowhere to be found in my v3 ehcache.xml file.
I cannot find it anywhere in the documentation or in SO.
This is my ehcache v3 xml file, but it seems neither <config>
element nor <cache>
element have some sort of dynamicConfig attribute that I need.
<config xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xmlns='http://www.ehcache.org/v3'
xsi:schemaLocation="
http://www.ehcache.org/v3
http://www.ehcache.org/schema/ehcache-core-3.7.xsd">
<persistence directory="spring-boot-ehcache/cache" />
<cache alias="categoriesCache">
<expiry>
<ttl unit="seconds">3000</ttl>
</expiry>
<listeners>
<listener>
<class>com.something.somethingv.jr.be.cache.CacheEventLogger
</class>
<event-firing-mode>ASYNCHRONOUS</event-firing-mode>
<event-ordering-mode>UNORDERED</event-ordering-mode>
<events-to-fire-on>CREATED</events-to-fire-on>
<events-to-fire-on>EXPIRED</events-to-fire-on>
<events-to-fire-on>EVICTED</events-to-fire-on>
</listener>
</listeners>
<resources>
<heap>1000</heap>
<offheap unit="MB">10</offheap>
<disk persistent="true" unit="MB">20</disk>
</resources>
</cache>
<cache alias="autocompleteCache">
<expiry>
<ttl unit="seconds">3000</ttl>
</expiry>
<listeners>
<listener>
<class>com.something.somethingv.jr.be.cache.CacheEventLogger
</class>
<event-firing-mode>ASYNCHRONOUS</event-firing-mode>
<event-ordering-mode>UNORDERED</event-ordering-mode>
<events-to-fire-on>CREATED</events-to-fire-on>
<events-to-fire-on>EXPIRED</events-to-fire-on>
<events-to-fire-on>EVICTED</events-to-fire-on>
</listener>
</listeners>
<resources>
<heap>1000</heap>
<offheap unit="MB">10</offheap>
<disk persistent="true" unit="MB">20</disk>
</resources>
</cache>
</config>
So, how can I do it?