private static bool removeFromExpireCache(DateTime k, string v) { if (!ExpireCache.ContainsKey(k)) { return(false); } var ls = ExpireCache[k]; if (ls == null) { return(false); } return(ls.Remove(v)); }
private static void addToExpireCache(DateTime k, string v) { HashSet <string> ls = null; if (ExpireCache.ContainsKey(k)) { ls = ExpireCache[k]; } else { ls = new HashSet <string>(); ExpireCache.Add(k, ls); } ls.Add(v); }