/// <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); } }
public void Clear() { IDictionaryEnumerator cacheEnum = _cache.GetEnumerator(); while (cacheEnum.MoveNext()) { _cache.Remove(cacheEnum.Key.ToString()); } }