LockFreeCacheOptions Class

Represents the options for creating a fast, lock-free, thread safe cache by the ThreadSafeCacheFactory.Create<TKey, TValue> methods.
To see when to use LockFreeCacheOptions or LockingCacheOptions see the Remarks section of the CreateTKey, TValue(FuncTKey, TValue, IEqualityComparerTKey, ThreadSafeCacheOptionsBase) method.

Definition

Namespace: KGySoft.Collections
Assembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 10.0.0
C#
public sealed class LockFreeCacheOptions : ThreadSafeCacheOptionsBase
Inheritance
Object    ThreadSafeCacheOptionsBase    LockFreeCacheOptions

Constructors

LockFreeCacheOptionsInitializes a new instance of the LockFreeCacheOptions class

Properties

HashingStrategy Gets or sets the hashing strategy to be used by the cache.
Default value: Auto.
InitialCapacity Gets or sets the initial capacity of the cache.
Default value: 16.
See also the Remarks section of the ThresholdCapacity property for details.
MergeInterval Gets or sets a time period, which may trigger a merge operation into the faster read-only storage even when no new elements are added. If , then time-based merging is disabled.
Default value: .
ThresholdCapacity Gets or sets the maximum number of elements, which triggers a merge operation from the underlying dynamic growing storage into the faster read-only storage. Specifies also the number of elements to be kept when older elements are dropped from the cache. The actual maximum number of stored items may be about twice of this value.
Default value: 1024.

Extension Methods

Convert Converts an Object specified in the obj parameter to the desired targetType.
See the Examples section of the generic ConvertTTarget(Object, CultureInfo) overload for an example.
(Defined by ObjectExtensions)
ConvertTTarget Converts an Object specified in the obj parameter to the desired TTarget.
(Defined by ObjectExtensions)
In Gets whether item is among the elements of set.
See the Examples section of the generic InT(T, T) overload for an example.
(Defined by ObjectExtensions)
TryConvert Tries to convert an Object specified in the obj parameter to the desired targetType.
See the Examples section of the ConvertTTarget(Object, CultureInfo) method for a related example.
(Defined by ObjectExtensions)
TryConvert Tries to convert an Object specified in the obj parameter to the desired targetType.
See the Examples section of the ConvertTTarget(Object, CultureInfo) method for a related example.
(Defined by ObjectExtensions)
TryConvertTTarget Tries to convert an Object specified in the obj parameter to the desired TTarget.
See the Examples section of the ConvertTTarget(Object, CultureInfo) method for a related example.
(Defined by ObjectExtensions)
TryConvertTTarget Tries to convert an Object specified in the obj parameter to the desired TTarget.
See the Examples section of the ConvertTTarget(Object, CultureInfo) method for a related example.
(Defined by ObjectExtensions)

See Also