文件名从 Service/HStation.Service.Assets.Core/05-service/13-Package/04-PackageSeriesManufacturerMapping/Cache/AssetsPackageSeriesManufacturerMappingCacheHelper.cs 修改 |
| | |
| | | /// <summary> |
| | | /// 璁剧疆缂撳瓨 |
| | | /// </summary> |
| | | public static void Set(List<Model.AssetsPackageSeriesManufacturerMapping> list, int Minites = 30, int RandomSeconds = 0) |
| | | public static void Set(List<Model.AssetsPackageMfrMapping> list, int Minites = 30, int RandomSeconds = 0) |
| | | { |
| | | var cacheKey = GetCacheKey(); |
| | | MemoryCacheHelper.Set(cacheKey, list, Minites * 60 + RandomSeconds); |
| | |
| | | /// 鑾峰彇缂撳瓨 |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public static List<Model.AssetsPackageSeriesManufacturerMapping> Get() |
| | | public static List<Model.AssetsPackageMfrMapping> Get() |
| | | { |
| | | var cacheKey = GetCacheKey(); |
| | | return MemoryCacheHelper.Get<List<Model.AssetsPackageSeriesManufacturerMapping>>(cacheKey); |
| | | return MemoryCacheHelper.Get<List<Model.AssetsPackageMfrMapping>>(cacheKey); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 鑾峰彇璁剧疆缂撳瓨 |
| | | /// </summary> |
| | | public static List<Model.AssetsPackageSeriesManufacturerMapping> GetSet(Func<List<Model.AssetsPackageSeriesManufacturerMapping>> func, int Minites = 30, int RandomSeconds = 0) |
| | | public static List<Model.AssetsPackageMfrMapping> GetSet(Func<List<Model.AssetsPackageMfrMapping>> func, int Minites = 30, int RandomSeconds = 0) |
| | | { |
| | | var cacheKey = GetCacheKey(); |
| | | return MemoryCacheHelper.GetSet(cacheKey, func, Minites * 60 + RandomSeconds); |