Example #1
0
        /// <summary>
        /// 清空Cash对象
        /// </summary>
        public static void Clear()
        {
            IDictionaryEnumerator CacheEnum = _cache.GetEnumerator();
            ArrayList             al        = new ArrayList();

            while (CacheEnum.MoveNext())
            {
                al.Add(CacheEnum.Key);
            }

            foreach (string key in al)
            {
                _cache.Remove(key);
            }
        }
Example #2
0
        public void Clear()
        {
            IDictionaryEnumerator cacheEnum = _cache.GetEnumerator();

            while (cacheEnum.MoveNext())
            {
                _cache.Remove(cacheEnum.Key.ToString());
            }
        }