KGy SOFT

CacheTKey, TValueBehavior Property

KGy SOFT Core Libraries Help
Gets or sets the cache behavior when cache is full and an element has to be removed. The cache is full, when Count reaches the Capacity. Default value: RemoveLeastRecentUsedElement.

Namespace:  KGySoft.Collections
Assembly:  KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 5.0.0-rc.1
Syntax

public CacheBehavior Behavior { get; set; }

Property Value

Type: CacheBehavior

Implements

ICacheBehavior
Remarks

When cache is full (that is, when Count reaches Capacity) and a new element has to be stored, then an element has to be dropped out from the cache. The dropping-out strategy is specified by this property. The suggested behavior depends on cache usage. See possible behaviors at CacheBehavior enumeration.

Note Note
Changing value of this property will not reorganize cache, just switches between the maintaining strategies. Cache order is maintained on accessing a value.
See Also

Reference