InMemoryCacheOptions
In-Memory cache options
/// <summary>
/// In-Memory cache options
/// </summary>
public class InMemoryCacheOptions
{
/// <summary>
/// Sets system clock
/// </summary>
public ISystemClock Clock { get; set; }
/// <summary>
/// Gets or sets the minimum length of time between successive scans for expired items.
/// Default value is 60 seconds
/// </summary>
public int ExpirationScanFrequencyInSeconds{ get; set; } = 60;
/// <summary>
/// Gets or sets the maximum size of the cache.
/// Default value is null.
/// </summary>
public ulong? SizeLimit { get; set; }
/// <summary>
/// Gets or sets the amount to compact the cache by when the maximum size is exceeded.
/// Value must be between 0 and 1.
/// Default value is 0.05
/// </summary>
public double CompactionPercentage { get; set; }
/// <summary>
/// Gets or sets whether to track memory cache statistics.
/// Disabled by default (false).
/// </summary>
public bool TrackStatistics { get; set; }
/// <summary>
/// Gets or sets whether to track linked entries.
/// Disabled by default (false).
/// </summary>
/// <remarks>Prior to .NET 7 this feature was always enabled.</remarks>
public bool TrackLinkedCacheEntries { get; set; }
}
Last updated