📜  ASP.NET Core 从 IMemoryCache 设置更新清除缓存(由 CacheExtensions 类的 Set 方法设置) - C# 代码示例
📅  最后修改于: 2022-03-11 14:49:12.454000             🧑  作者: Mango
代码示例3
serviceCollection.AddSingleton();
public interface IMyCache : IEnumerable>, IMemoryCache
{
///
/// Clears all cache entries.
///
void Clear();
}
public class MyMemoryCache : IMyCache
{
private readonly IMemoryCache _memoryCache;
private readonly ConcurrentDictionary