/// <summary> /// 更新信息 /// </summary> public int UpdateInfo(SqlTransaction trans, DistributorServiceSettingModel disModel, long SN) { string key = "Cache_DistributorServiceSetting_Model_" + SN; CacheHelper.RemoveCache(key); return(disDAL.UpdateInfo(trans, disModel, SN)); }
/// <summary> /// 从缓存读取信息 /// </summary> public DistributorServiceSettingModel GetCacheInfo(SqlTransaction trans, long SN) { string key = "Cache_DistributorServiceSetting_Model_" + SN; object value = CacheHelper.GetCache(key); if (value != null) { return((DistributorServiceSettingModel)value); } else { DistributorServiceSettingModel disModel = disDAL.GetInfo(trans, SN); CacheHelper.AddCache(key, disModel, null, Cache.NoAbsoluteExpiration, TimeSpan.FromMinutes(20), CacheItemPriority.Normal, null); return(disModel); } }
/// <summary> /// 插入信息 /// </summary> public int InsertInfo(SqlTransaction trans, DistributorServiceSettingModel disModel) { return(disDAL.InsertInfo(trans, disModel)); }