ehcacheehcache-bigmemory

How to configure off-heap memory?


My Ehcache(2.10.4) has been utilising heap memory a lot by default, what is the procedure to configure off-heap memory on the same?

EHCache Config of the same:

<defaultCache
    maxElementsInMemory="8000"
    maxElementsOnDisk="10000"
    eternal="false"
    timeToIdleSeconds="3600"
    timeToLiveSeconds="3600"
    overflowToDisk="true"
    diskPersistent="false"
    diskExpiryThreadIntervalSeconds="120"
    memoryStoreEvictionPolicy="LRU"
/>

Is there something that needs to be done for configuring off-heap memory.


Solution

  • Ehcache 2.x offers offheap support only as a commercial feature. However Ehcache 3.x offers it as part of the open source version.