public static void RemoveByPrefix(string keyPrefix) { var keys = CacheManagerFactory.DefaultCacheManager.GlobalObjectCache() .Where(it => it.Key.StartsWith(keyPrefix)) .Select(it => it.Key); foreach (var key in keys) { CacheManagerFactory.DefaultCacheManager.GlobalObjectCache().Remove(key); CacheExpiredNotification.Notify("___GlobalCache___", key); } }
public static void ClearWithNotify(string cacheName) { DefaultCacheManager.Clear(cacheName); CacheExpiredNotification.Notify(cacheName, null); }
public static void Remove(string key) { CacheManagerFactory.DefaultCacheManager.GlobalObjectCache().Remove(key); CacheExpiredNotification.Notify("___GlobalCache___", key); }
public static void Remove(string key) { Cache.Remove(key); CacheExpiredNotification.Notify("___GlobalCache___", key); }