Files
Atomx/Atomx.Data/CacheServices/BasicCacheService.cs
2025-12-02 13:10:10 +08:00

47 lines
1.6 KiB
C#

//namespace Atomx.Data.CacheServices
//{
// public partial interface ICacheService
// {
// /// <summary>
// /// 获取行为日志类型,自动初始化
// /// </summary>
// /// <param name="reload">是否重载</param>
// /// <returns></returns>
// Task<List<ActionLogType>> GetActionLogTypes(bool reload = false);
// /// <summary>
// /// 获取行为日志类型
// /// </summary>
// /// <param name="reload">是否重载</param>
// /// <returns></returns>
// Task<List<ActionLogType>> GetActionLogTypeList(List<ActionLogType>? data = null);
// }
// public partial class CacheService : ICacheService
// {
// public async Task<List<ActionLogType>> GetActionLogTypes(bool reload = false)
// {
// var cacheData = await GetCacheAsync<List<ActionLogType>>(CacheKeys.ActionLogType);
// if (cacheData == null || reload)
// {
// cacheData = _dbContext.ActionLogTypes.ToList();
// await SetCacheAsync(CacheKeys.ActionLogType, cacheData);
// }
// return cacheData;
// }
// public async Task<List<ActionLogType>> GetActionLogTypeList(List<ActionLogType>? data = null)
// {
// var cacheData = await GetCacheAsync<List<ActionLogType>>(CacheKeys.ActionLogType);
// if (cacheData == null || data != null)
// {
// cacheData = data;
// await SetCacheAsync(CacheKeys.ActionLogType, cacheData);
// }
// return cacheData;
// }
// }
//}