protected void DisposeCache() { try { if (_cache != null) { lock (s_dataLock) { s_cacheNeedInit = true; _cache.Dispose(); _cache = null; } } if (_logs) { LogInfo("Disposed", null); } } catch (Exception exc) { LogError(exc, null); } finally { } }
private void OnAppDomainUnload(object unusedObject, EventArgs unusedEventArgs) { try { System.Threading.Thread.GetDomain().DomainUnload -= LegacyProvider.s_onAppDomainUnload; if (_cache != null) { lock (s_dataLock) { s_cacheNeedInit = true; _cache.Dispose(); _cache = null; } } if (_logs) { NCacheLog.Info(" disposed"); } } catch (Exception exc) { RaiseException(exc); } finally { } }