/// <summary> /// Removes all entries from the store. /// </summary> internal override void ClearInternal() { if (_cacheStore == null) { throw new InvalidOperationException(); } _cacheStore.Clear(); _topicManager.Clear(); _context.PerfStatsColl.SetCacheSize(0); // on clear cache cachesize set to zero if (_evictionThread != null) { NCacheLog.Flush(); #if !NETCORE _evictionThread.Abort(); #elif NETCORE _evictionThread.Interrupt(); #endif } if (_evictionPolicy != null) { _evictionPolicy.Clear(); if (_context.PerfStatsColl != null) { _context.PerfStatsColl.SetEvictionIndexSize(_evictionPolicy.IndexInMemorySize); } } }
public void Clear() { Sync.AcquireWriterLock(Timeout.Infinite); try { _evctPolicy.Clear(); } finally { Sync.ReleaseWriterLock(); } }
/// <summary> /// Método interno usado para limpar os dados da instancia. /// </summary> internal override void ClearInternal() { if (_cacheStore == null) { throw new InvalidOperationException(); } _cacheStore.Clear(); if (_evictionThread != null) { _evictionThread.Abort(); } if (_evictionPolicy != null) { _evictionPolicy.Clear(); } }