Construct the builder
Declaration Syntax
C# | Visual Basic | Visual C++ | J# |
public LruSegmentEvictionStrategyBuilder( int sizeLimit, int evictionBatchSize, bool doPeriodicClear, double touchThreshold )
Public Sub New ( _ sizeLimit As Integer, _ evictionBatchSize As Integer, _ doPeriodicClear As Boolean, _ touchThreshold As Double _ )
Parameters
- sizeLimit (Int32)
- Local Cache sizelimit (Of all the segments)
- evictionBatchSize (Int32)
- How many entries to evict from cache when an eviction is required
- doPeriodicClear (Boolean)
- Should clear local cahe periodicly
- touchThreshold (Double)
- When the number of objects in the cache exceeds this threshold, each time an object is accessed at the cache, the Touch(TKey, TValue) method of the eviction strategy will be called. Before the threshold is exceeded the Touch(TKey, TValue) method will not called thus improving the performance of the cache when it is not near its size limit because eviction is not likely to occur. The threshold is a number between 0 and 1 which represents a capacity out of the size limit, this is done by the following formula: touchThreshold * sizeLimit.