Gets or sets the capacity of the cache. If new value is smaller than elements count (value of the Count property),
then old or least used elements (depending on Behavior) will be removed from CacheTKey, TValue.
Default value: 128, if the CacheTKey, TValue was initialized without specifying a capacity; otherwise, as it was initialized.
Default value: 128, if the CacheTKey, TValue was initialized without specifying a capacity; otherwise, as it was initialized.
Namespace: KGySoft.Collections
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 7.0.0-preview.3
Syntax
Property Value
Type: Int32Implements
ICacheCapacityRemarks
If new value is smaller than elements count, then cost of setting this property is O(n), where n is the difference of Count before setting the property and the new capacity to set.
If new value is larger than elements count, and EnsureCapacity returns , then cost of setting this property is O(n), where n is the new capacity.
Otherwise, the cost of setting this property is O(1).
See Also