LockFreeCacheOptionsMergeInterval Property
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: .
Namespace: KGySoft.CollectionsAssembly: KGySoft.CoreLibraries (in KGySoft.CoreLibraries.dll) Version: 8.1.0
public TimeSpan? MergeInterval { get; set; }
Public Property MergeInterval As TimeSpan?
Get
Set
public:
property Nullable<TimeSpan> MergeInterval {
Nullable<TimeSpan> get ();
void set (Nullable<TimeSpan> value);
}
member MergeInterval : Nullable<TimeSpan> with get, set
Property Value
NullableTimeSpan Even if this property is set, capacity-based merging works as described in the Remarks section of the ThresholdCapacity property.
Even if this property is set, no extra resources (such as timer) are used. No merging occurs if elements are retrieved from the faster read-only cache.
A time-based merging may occur only if the dynamically growing storage is accessed.
Once the stored number of elements reaches ThresholdCapacity the value of this property is ignored.
Depending on the targeted platform it is possible that no time-based merging occurs more often than 15 milliseconds.
Set this property when it is likely that the number of stored elements will not reach the specified capacities (maybe even
InitialCapacity)
and you still want to make sure that the stored elements are merged into the faster read-only storage even if no newer elements are added.