示例#1
0
        public void Dispose()
        {
            if (_cache == null)
            {
                return;
            }

            _cache.Dispose();
            _cache = null;
        }
示例#2
0
        public void Dispose()
        {
            if (_connectionRecycler != null)
            {
                _connectionRecycler.Dispose();
                _connectionRecycler = null;
            }

            if (_caches == null)
            {
                return;
            }

            foreach (DictionaryEntry entry in _caches)
            {
                Alachisoft.NCache.Web.Caching.Cache cache = entry.Value as Alachisoft.NCache.Web.Caching.Cache;
                if (cache != null)
                {
                    cache.Dispose();
                }
            }
            _caches.Clear();
            _caches = null;
        }