using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Extensions.Caching.Memory;
using System.Text;
namespace IStation
{
///
/// 待编写
///
internal sealed partial class SharedMemoryCache : IMemoryCacheDirect
{
///
/// 单例模式(延迟加载)
///
private static readonly Lazy _lazy = new Lazy(() => new SharedMemoryCache());
///
/// MemoryCache 实例
///
private MemoryCache _memoryCache;
///
/// 当前正在设置缓存项的缓存键集合
/// Collection of all cache keys currently executing a function to set a cache item
///
private ConcurrentDictionary _cacheKeysBeingHandled;
///
/// Locker object
///
private object _wipeLock = new object();
///
/// 标识Wipe方法是否正在执行
/// State flag indicating whether the wipe method is currently being executed
///
private bool _isWiping = false;
///
/// Locker object, used to lock set operations when a wipe is in progress
///
private object _setLock = new object();
///
/// State flag indicating whether any non-waitable set action is currently being executed
///
private bool _isSetting = false;
}
}