EhCache overflow to disk at specific path

Viewed 14841

I am using ehcache with hibernate in my application. here is configuration of ehcache.xml

<ehcache>
    <diskStore path="java.io.tmpdir"/>        

    <defaultCache
            maxElementsInMemory="10"
            eternal="false"
            timeToIdleSeconds="120"
            timeToLiveSeconds="120"
            overflowToDisk="true"
            diskSpoolBufferSizeMB="300"
            maxElementsOnDisk="10000000"
            diskPersistent="false"
            diskExpiryThreadIntervalSeconds="120"
            memoryStoreEvictionPolicy="LRU"
            />
</ehcache>

my diskStore path is java.io.tmpdir, which i want to change to my application path as ${WebApp}/DiskStore

4 Answers

Here you go.

user.home -> It is user home directory e.i C:\Users\abc (windowdrive:\Users\username) user.dir -> C:\Users\abc\eclipse-workspace\project java.io.tmpdir -> C:\Users\abc\AppData\Local\Temp\ ehcache.disk.store.dir - A system property (https://www.ehcache.org/documentation/3.7/)

For more help feel free to communicate over email uncer_sh@yahoo.com

Thanks

Related