Exemplo n.º 1
0
        public static async Task <bool> RefreshVipCardCacheByActivityIdAsync(string activityId)
        {
            using (var client = CacheHelper.CreateCacheClient(ActivityManager.DefaultClientName))
            {
                var data = await DalActivity.GetVipCardSaleConfigDetailsAsync(activityId);

                var result = await client.SetAsync(GlobalConstant.VipCardPrefix + activityId, data
                                                   , TimeSpan.FromDays(10));

                if (result.Success)
                {
                    return(true);
                }
                else
                {
                    Logger.Warn($"set redis缓存失败,接口==》RefreshVipCardCacheByActivityIdAsync");
                    return(false);
                }
            }
        }