문제

I am using ehcache with terracotta, and I wonder what is the meaning of the attribute maxElementsOnDisk in such cotext.

Does it mean the max elemnts allowed on the terracotta layer?

If not, what is the attribute controlling the number of elements allowed on the tarracotta layer?

If I understand correctly maxEntriesLocalHeap represents the number of entries allowed on the local heap tier, and it can overflow to terracotta layer which can overflow to disk (please correct me if I am wrong) but I am not sure what is the name of the element controlling each element.

BTW, in my use case I will never want entries to be written to disk, If there is no more room in the local heap or terracotta layer the entry should be evicted.

Yosi

도움이 되었습니까?

해결책

There are 2 stores and related options:

  • L1: MemoryStore (local JVM of node) -> maxElementsInMemory
  • L2: DiskStore -> maxElementsOnDisk

The L2 size represents the maximum cache size. Elements can overflow from L1 to L2.

When using Terracotta, the maxElementsOnDisk value is overridden to provide the L2 size. Also, the DiskStore is never used because the elements overflow to Terracotta (L2 Store).

You can read about it in the official FAQs and a related bug report.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top