Show / Hide Table of Contents

# Class LruEvictionPolicy

Eviction policy based on Least Recently Used (LRU) algorithm with batch eviction support.

The eviction starts in the following cases: The cache size becomes { @code 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.

Note: Batch eviction is enabled only if maximum memory limit isn't set.

This implementation is very efficient since it does not create any additional table-like data structures. The LRU ordering information is maintained by attaching ordering metadata to cache entries.

##### Inheritance

System.Object
EvictionPolicyBase
LruEvictionPolicy

##### Implements

IEvictionPolicy

##### Inherited Members

EvictionPolicyBase.DefaultBatchSize
EvictionPolicyBase.DefaultMaxSize
EvictionPolicyBase.DefaultMaxMemorySize
EvictionPolicyBase.BatchSize
EvictionPolicyBase.MaxSize
EvictionPolicyBase.MaxMemorySize
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()

###### Namespace: Apache.Ignite.Core.Cache.Eviction

###### Assembly: Apache.Ignite.Core.dll

##### Syntax

    public class LruEvictionPolicy : EvictionPolicyBase, IEvictionPolicy

### Implements

IEvictionPolicy