예제 #1
0
        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));
        }
예제 #2
0
        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);
        }