wanshenmean
2026-03-11 5af11cc200dd5ebe474b9c0475883b0e6d1e3759
Code/WMS/WIDESEA_WMSServer/WIDESEA_Core/Caches/MemoryCacheService.cs
@@ -9,11 +9,11 @@
{
    public class MemoryCacheService : ICacheService
    {
        protected IMemoryCache _cache;
        private readonly IMemoryCache _cache;
        public MemoryCacheService(IMemoryCache cache)
        {
            _cache = cache;
            _cache = cache ?? throw new ArgumentNullException(nameof(cache));
        }
        public bool Add(string key, string value, int expireSeconds = -1, bool isSliding = false)
@@ -54,8 +54,7 @@
        public void Dispose()
        {
            if (_cache != null)
                _cache.Dispose();
            _cache?.Dispose();
            GC.SuppressFinalize(this);
        }
@@ -68,7 +67,7 @@
            return _cache.Get(key) != null;
        }
        public T Get<T>(string key) where T : class
        public T? Get<T>(string key) where T : class
        {
            if (key == null)
            {