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.