public void Clear() { List <object> keys = new List <object>(); var enumerator = AppCache.GetEnumerator(); while (enumerator.MoveNext()) { if (enumerator.Key.ToString().Contains(ArenaConstants.CENTRAL_ORG_CODE)) { keys.Add(enumerator.Key); } } foreach (var key in keys) { Remove(key.ToString()); } }