ningshuxia
2025-04-03 4917fb959e2befec07a693e72d7010c09494ec7c
02-desktop/Component/IStation.MemoryCache/Cache/SharedMemoryCache_Wipe.cs
@@ -13,17 +13,17 @@
        /// </summary>
        public void Wipe()
        {
            if (this._isWiping) { return; }
            if (_isWiping) { return; }
            lock (this._wipeLock)
            lock (_wipeLock)
            {
                if (this._isWiping) { return; }
                if (_isWiping) { return; }
                this._isWiping = true;
                _isWiping = true;
                SpinWait.SpinUntil(() => !this._isSetting); // wait until all running set operations are complete (new ones are blocked)
                SpinWait.SpinUntil(() => !_isSetting); // wait until all running set operations are complete (new ones are blocked)
                var keys = this._memoryCache.Select(x => x.Key);
                var keys = _memoryCache.Select(x => x.Key);
                Parallel.ForEach(keys, x => ((IMemoryCacheDirect)this).Remove(x));
@@ -36,7 +36,7 @@
                }
                finally
                {
                    this._isWiping = false;
                    _isWiping = false;
                }
            }
        }