/// <summary> /// 清除Cache /// </summary> public static void Clear() { var CacheList = cache.DefaultIfEmpty().ToList(); foreach (var element in CacheList) { if (element.Key != null) //身分過期不執行Remove { cache.Remove(element.Key); } } }
/// <summary> /// 清除Cache /// </summary> public static void Clear() { var CacheList = cache.DefaultIfEmpty().ToList(); foreach (var element in CacheList) { if (element.Key != null) //身分過期不執行Remove { cache.Remove(element.Key); } } }