public ProductsController(RedisService redisService) { _redisService = redisService; _db = _redisService.GetDB(3); products = ProductsList.GenerateProductsList(); if (_db.ListGetByIndex(listKey, 0).IsNullOrEmpty) { products.Where(x => x.IsPopular == true).ToList().ForEach(product => { var data = JsonConvert.SerializeObject(product); _db.ListLeftPush(listKey, data); }); } }