lixiaojun
2024-10-12 f2333318a31e92f6cbc3a572d8eb9fae9da0f892
Service/HStation.Service.Assets.Core/05-service/01-PumpMainManage/01-PumpSeries/Cache/PumpSeriesCacheHelper.cs
@@ -1,12 +1,12 @@
namespace HStation.Service
{
    /// <summary>
    /// PumpSeries
    /// AssetsPumpSeries
    /// 缓存辅助类
    /// </summary>
    internal class PumpSeriesCacheHelper
    internal class AssetsPumpSeriesCacheHelper
    {
        private const string _contentKey = "PumpSeriesList";
        private const string _contentKey = "AssetsPumpSeriesList";
        internal static string GetCacheKey()
        {
@@ -16,7 +16,7 @@
        /// <summary>
        /// 设置缓存
        /// </summary>
        public static void Set(List<Model.PumpSeries> list, int Minites = 30, int RandomSeconds = 0)
        public static void Set(List<Model.AssetsPumpSeries> list, int Minites = 30, int RandomSeconds = 0)
        {
            var cacheKey = GetCacheKey();
            MemoryCacheHelper.Set(cacheKey, list, Minites * 60 + RandomSeconds);
@@ -26,16 +26,16 @@
        /// 获取缓存
        /// </summary>
        /// <returns></returns>
        public static List<Model.PumpSeries> Get()
        public static List<Model.AssetsPumpSeries> Get()
        {
            var cacheKey = GetCacheKey();
            return MemoryCacheHelper.Get<List<Model.PumpSeries>>(cacheKey);
            return MemoryCacheHelper.Get<List<Model.AssetsPumpSeries>>(cacheKey);
        }
        /// <summary>
        /// 获取设置缓存
        /// </summary>
        public static List<Model.PumpSeries> GetSet(Func<List<Model.PumpSeries>> func, int Minites = 30, int RandomSeconds = 0)
        public static List<Model.AssetsPumpSeries> GetSet(Func<List<Model.AssetsPumpSeries>> func, int Minites = 30, int RandomSeconds = 0)
        {
            var cacheKey = GetCacheKey();
            return MemoryCacheHelper.GetSet(cacheKey, func, Minites * 60 + RandomSeconds);