public static void Clear() { System.Collections.IDictionaryEnumerator enumerator = PowerCache.SystemCache.GetEnumerator(); while (enumerator.MoveNext()) { PowerCache.Remove(enumerator.Key.ToString()); } }
internal static ModelTypeData GetModelTypeData(System.Type type) { return(PowerCache.Get <ModelTypeData>(string.Concat(new object[] { "Power::ModelTypeData::", type.Name, "::", type.GUID }), () => ModelTypeDataProvider.ReflectClass(type), null, 2147483647, null, true, CacheItemPriority.Normal)); }
public static void Clear(string pattern) { System.Collections.IDictionaryEnumerator enumerator = PowerCache.SystemCache.GetEnumerator(); Regex regex = new Regex(pattern, RegexOptions.ExplicitCapture | RegexOptions.Compiled | RegexOptions.Singleline); while (enumerator.MoveNext()) { string text = enumerator.Key.ToString(); if (regex.IsMatch(text)) { PowerCache.Remove(text); } } }