Exemplo n.º 1
0
        public static bool CreateKeysetIfNotExists(KeysetId setId)
        {
            if (CacheSet.GetKeysetContext(setId, false) == null)
            {
                CacheSet.GetKeysetContext(setId, true);
                return(true);
            }

            return(false);
        }
Exemplo n.º 2
0
        public static string[] GetKeysFromKeySet(KeysetId setId)
        {
            HashSet <string> set;

            var cksc = CacheSet.GetKeysetContext(setId, false);

            if (cksc == null)
            {
                return(null);
            }

            TryGetCachedResult <HashSet <string> >(cksc.CacheSetKey, out set);

            if (set == null)
            {
                return(null);
            }

            return(set.ToArray());
        }