src/DotNetCommon.Core/Cache/Impl/MemoryCacheOptions.cs
(完整代码) 1KB//// Licensed to the .NET Foundation under one or more agreements.
//// The .NET Foundation licenses this file to you under the MIT license.
//
//using DotNetCommon.Cache.Internal;
//using System;
//
//namespace DotNetCommon.Cache.Impl
//{
// internal class MemoryCacheOptions
// {
// private long? _sizeLimit;
// private double _compactionPercentage = 0.05;
//
// public ISystemClock Clock { get; set; }
//
// /// <summary>
// /// Gets or sets the minimum length of time between successive scans for expired items.
// /// </summary>
// public TimeSpan ExpirationScanFrequency { get; set; } = TimeSpan.FromMinutes(1);
//
// /// <summary>
// /// Gets or sets the maximum size of the cache.
// /// </summary>
// public long? SizeLimit
// {
// get => _sizeLimit;
// set
// {
// if (value < 0)
// {
// throw new ArgumentOutOfRangeException(nameof(value), value, $"{nameof(value)} must be non-negative.");
// }
//
// _sizeLimit = value;
// }
// }
//
// /// <summary>
// /// Gets or sets the amount to compact the cache by when the maximum size is exceeded.
// /// </summary>
// public double CompactionPercentage
// {
// get => _compactionPercentage;
// set
// {
// if (value < 0 || value > 1)
// {
// throw new ArgumentOutOfRangeException(nameof(value), value, $"{nameof(value)} must be between 0 and 1 inclusive.");
// }
//
// _compactionPercentage = value;
// }
// }
// }
//}
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
