从net.sf.ehcache-1.6.2迁移到ehcache 3.8.1

从net.sf.ehcache-1.6.2迁移到ehcache 3.8.1,ehcache,ehcache-3,Ehcache,Ehcache 3,我正在从com.springsource.net.sf.ehcache-1.6.2.jar迁移到 <!-- https://mvnrepository.com/artifact/org.ehcache/ehcache --> <dependency> <groupId>org.ehcache</groupId> <artifactId>ehcache</artifactId>

我正在从
com.springsource.net.sf.ehcache-1.6.2.jar
迁移到

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

org.ehcache
ehcache
3.8.1
特别是,我需要迁移以下配置设置:

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

到目前为止,我有:

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

86400
10000

如何迁移
external
timeToIdleSeconds
overflowToDisk
设置?

您找到这个问题的答案了吗?因为我正在研究相同的ehcache迁移。我发现,对于expiry块,我们需要定义自己的自定义expiry类,使其同时具有ttl和tti时间。因为此XML配置不同时支持两者。我也很想知道MemoryStorejectionPolicy属性。不,我从来没有想过。你找到这个问题的答案了吗?因为我正在研究相同的ehcache迁移。我发现,对于expiry块,我们需要定义自己的自定义expiry类,使其同时具有ttl和tti时间。因为此XML配置不同时支持两者。我也很想知道MemoryStorejectionPolicy的财产。不,我从来没有这样做过。