You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.5 KiB
C#
45 lines
1.5 KiB
C#
using DS.Module.Core;
|
|
using DS.WMS.Core.Code.Entity;
|
|
using DS.WMS.Core.Map.Entity;
|
|
using DS.WMS.Core.Sys.Method;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace DS.WMS.Core.Sys.Interface
|
|
{
|
|
/// <summary>
|
|
/// 公共缓存
|
|
/// </summary>
|
|
public interface ISysCacheService
|
|
{
|
|
/// <summary>
|
|
/// 获取缓存数据
|
|
/// </summary>
|
|
/// <typeparam name="T">数据类型</typeparam>
|
|
/// <param name="cacheKey">缓存key枚举</param>
|
|
/// <returns></returns>
|
|
Task<DataResult<List<T>>> GetAllCommonCodeFromCache<T>(SysCacheKeyEnum cacheKey);
|
|
|
|
/// <summary>
|
|
/// 设置缓存
|
|
/// </summary>
|
|
/// <param name="cacheObj">被缓存的详情</param>
|
|
/// <param name="cacheKey">缓存key枚举</param>
|
|
/// <param name="outSecond">超期时间(毫米)</param>
|
|
/// <returns></returns>
|
|
Task<DataResult<string>> SetCommonCode(object cacheObj, SysCacheKeyEnum cacheKey, int outSecond = 0);
|
|
|
|
/// <summary>
|
|
/// 加载缓存
|
|
/// </summary>
|
|
/// <param name="cacheObj">被缓存的详情</param>
|
|
/// <param name="cacheKey">缓存key枚举</param>
|
|
/// <param name="isReload">是否强制刷新缓存</param>
|
|
/// <returns></returns>
|
|
Task<DataResult<string>> LoadCache(object cacheObj, SysCacheKeyEnum cacheKey, bool isReload = false);
|
|
}
|
|
}
|