Example #1
0
        public void SetIds(Type entityType, Guid[] ids)
        {
            var idsKey    = new EntityKeys().GetIdsKey(entityType);
            var client    = new RedisClient();
            var idsString = String.Join(",", ConvertToStringArray(ids));

            client.Set(idsKey, idsString);
        }
Example #2
0
        public Guid[] GetIds(Type entityType)
        {
            var idsKey = new EntityKeys().GetIdsKey(entityType);

            var client    = new RedisClient();
            var idsString = client.Get(idsKey);

            var ids = new Guid[] { };

            if (!String.IsNullOrEmpty(idsString))
            {
                var idsArray = idsString.Split(',');

                ids = ConvertToGuidArray(idsArray);
            }
            return(ids);
        }