Factory class for
Creates cache Eviction policy based on
Least Recently Used (LRU)
algorithm and supports batch eviction.
The eviction starts in the following cases:
- The cache size becomes
batchSize elements greater than the maximum size.
The size of cache entries in bytes becomes greater than the maximum memory size.
The size of cache entry calculates as sum of key size and value size.
Batch eviction is enabled only if maximum memory limit isn't set (
maxMemSize == 0
elements will be evicted in this case. The default
implementation is very efficient since it is lock-free and does not create any additional table-like
data structures. The
ordering information is maintained by attaching ordering metadata to cache entries.