public static bool UpdateBannerCache()
 {
     using (var client = new Tuhu.Service.Config.CacheClient())
     {
         var serviceResult = client.UpdateCarInsuranceBannerCache();
         return(serviceResult.Result);
     }
 }
        /// <summary>
        /// 刷新透明工场配置服务缓存
        /// </summary>
        /// <returns></returns>
        public bool RefreshLiveWorkShopConfigCache()
        {
            var result = false;

            try
            {
                using (var client = new Tuhu.Service.Config.CacheClient())
                {
                    var cacheResult = client.RefreshLiveWorkShopConfigCache();
                    cacheResult.ThrowIfException(true);
                    result = cacheResult.Result;
                }
            }
            catch (Exception ex)
            {
                Logger.Error("RefreshLiveWorkShopConfigCache", ex);
            }
            return(result);
        }
Пример #3
0
        /// <summary>
        /// 刷新违章查询城市服务缓存
        /// </summary>
        /// <returns></returns>
        public bool CleanPeccancyCitysCache()
        {
            var result = false;

            try
            {
                using (var client = new Tuhu.Service.Config.CacheClient())
                {
                    var cacheResult = client.UpdatePeccancyCitysCache();
                    cacheResult.ThrowIfException(true);
                    result = cacheResult.Result;
                }
            }
            catch (Exception ex)
            {
                Logger.Error("CleanPeccancyCitysCache", ex);
            }
            return(result);
        }
        public bool RefreshTipBannerConfigCache()
        {
            var result = false;

            try
            {
                var typeNames = dbScopeManagerConfigRead.Execute(
                    conn => DalTipBannerConfig.GetAllTipBannerTypeConfig(conn))
                                .Select(s => s.TypeName).ToList();
                using (var client = new Tuhu.Service.Config.CacheClient())
                {
                    var cacheResult = client.RefreshTipBannerConfigCache(typeNames);
                    cacheResult.ThrowIfException(true);
                    result = cacheResult.Result;
                }
            }
            catch (Exception ex)
            {
                Logger.Error("RefreshTipBannerConfigCache", ex);
            }
            return(result);
        }