ÎļþÃû´Ó Service/HStation.Service.Assets.Core/05-service/13-Kit/02-KitSeries/Cache/AssetsKitSeriesCacheHelper.cs ÐÞ¸Ä |
| | |
| | | namespace HStation.Service |
| | | { |
| | | /// <summary> |
| | | /// AssetsKitSeries |
| | | /// ç¼åè¾
å©ç±» |
| | | /// </summary> |
| | | internal class AssetsKitSeriesCacheHelper |
| | | internal class AssetsPackageSeriesCacheHelper |
| | | { |
| | | private const string _contentKey = "AssetsEquipmentSeriesList"; |
| | | |
| | |
| | | /// <summary> |
| | | /// 设置ç¼å |
| | | /// </summary> |
| | | public static void Set(List<Model.AssetsKitSeries> list, int Minites = 30, int RandomSeconds = 0) |
| | | public static void Set(List<Model.AssetsPackageSeries> list, int Minites = 30, int RandomSeconds = 0) |
| | | { |
| | | var cacheKey = GetCacheKey(); |
| | | MemoryCacheHelper.Set(cacheKey, list, Minites * 60 + RandomSeconds); |
| | |
| | | /// è·åç¼å |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public static List<Model.AssetsKitSeries> Get() |
| | | public static List<Model.AssetsPackageSeries> Get() |
| | | { |
| | | var cacheKey = GetCacheKey(); |
| | | return MemoryCacheHelper.Get<List<Model.AssetsKitSeries>>(cacheKey); |
| | | return MemoryCacheHelper.Get<List<Model.AssetsPackageSeries>>(cacheKey); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// è·å设置ç¼å |
| | | /// </summary> |
| | | public static List<Model.AssetsKitSeries> GetSet(Func<List<Model.AssetsKitSeries>> func, int Minites = 30, int RandomSeconds = 0) |
| | | public static List<Model.AssetsPackageSeries> GetSet(Func<List<Model.AssetsPackageSeries>> func, int Minites = 30, int RandomSeconds = 0) |
| | | { |
| | | var cacheKey = GetCacheKey(); |
| | | return MemoryCacheHelper.GetSet(cacheKey, func, Minites * 60 + RandomSeconds); |