Overflow Configuration Examples
The cache.xml
examples show configuration of region and server subscription queue overflows.
Configure overflow criteria based on one of these factors:
- Entry count
- Absolute memory consumption
- Memory consumption as a percentage of the application heap (not available for server subscription queues)
Configuration of region overflow:
<!-- Overflow when the region goes over 10000 entries -->
<region-attributes>
<eviction-attributes>
<lru-entry-count maximum="10000" action="overflow-to-disk"/>
</eviction-attributes>
</region-attributes>
Configuration of server’s client subscription queue overflow:
<!-- Overflow the server's subscription queues when the queues reach 1 Mb of memory -->
<cache>
<cache-server>
<client-subscription eviction-policy="mem" capacity="1"/>
</cache-server>
</cache>