TechTalk Genome v4.2

LruCache Constructor 

Initializes a new LruCache instance with the specified settings.

public LruCache(
   int maxSize,
   int minFreeAfterCollect,
   ICacheInvalidationStrategyFactory invalidationStrategy
);

Parameters

maxSize
The maximum size of the cache.
minFreeAfterCollect
The minimum required free space after a collection is started because the size limit specified by maxSize has been reached.
invalidationStrategy
The ICacheInvalidationStrategyFactory used to create the invalidation strategy of the cache.

Remarks

If a new item is added to the cache after the size limit specified by maxSize has been reached, a collection is started. In the first round all invalid entries are removed. If the free space after the first round is less than minFreeAfterCollect, the least recently used items are removed until the free space reaches minFreeAfterCollect.

Requirements

Namespace: TechTalk.Genome

Assembly: TechTalk.Genome (in TechTalk.Genome.dll)

Version: 4.2.4.4

Editions: Professional, Evaluation

See Also

LruCache Class | TechTalk.Genome Namespace