Ejemplo n.º 1
0
        public List <APIPoolDetailWithoutST> CacheRefresh_APIPoolDetailWithoutST()
        {
            var data0     = new List <APIPoolDetailWithoutST>();
            var redisKey  = Constants.Redis.FAPI_GetPoolDetail;
            var redislist = _redisService.GetCache(redisKey) as List <APIPoolDetailWithoutST>;

            if (redislist == null)
            {
                var list = this.GetAllTopPoolDetailWithoutST();
                data0 = _mapperService.MapCheck <List <APIPoolDetailWithoutST> >(list);
                if (data0.Count() > 0)
                {
                    _redisService.SetCache(redisKey, data0, TimeSpan.FromHours(24));
                }
            }
            else
            {
                data0 = redislist;
            }
            return(data0);
        }