1

I am migrating from com.springsource.net.sf.ehcache-1.6.2.jar to

    <!-- https://mvnrepository.com/artifact/org.ehcache/ehcache -->
    <dependency>
        <groupId>org.ehcache</groupId>
        <artifactId>ehcache</artifactId>
        <version>3.8.1</version>
    </dependency>

In particular, I need to migrate the following configuration setting:

<defaultCache
    maxElementsInMemory="10000"
    eternal="false"
    timeToIdleSeconds="86400"
    timeToLiveSeconds="86400"
    overflowToDisk="true" />

So far I have this:

<cache-template name="defaultCache">
    <expiry>
        <ttl>86400</ttl>
    </expiry>
    <resources>
        <heap>10000</heap>
    </resources>
</cache-template>

How do I migrate the eternal, timeToIdleSeconds, and overflowToDisk settings?

Paul Reiners
  • 8,576
  • 33
  • 117
  • 202
  • 1
    Have you found your answers on this issue? Because I am looking into the same ehcache migration. What I found is that for expiry block, we need to define our own custom expiry class to have both ttl and tti times. because this XML configuration does not support both of them at the same time. I do wonder about the memoryStoreEvictionPolicy property as well. – Ekin Yücel Oct 19 '20 at 10:43
  • No, I never did. – Paul Reiners Oct 20 '20 at 18:42

0 Answers0