shgx_tz_mom/ZR.Service/System/CacheService.cs

30 lines
771 B
C#
Raw Normal View History

2023-06-08 11:48:04 +08:00
using System.Collections.Generic;
2022-04-10 16:52:10 +08:00
using System.Linq;
using ZR.Common;
2023-06-08 11:48:04 +08:00
using ZR.Common.Cache;
2022-04-10 16:52:10 +08:00
namespace ZR.Service.System
{
public class CacheService
{
#region
public static List<string> GetUserPerms(string key)
{
return (List<string>)CacheHelper.GetCache(key);
2023-06-08 11:48:04 +08:00
//return RedisServer.Cache.Get<List<string>>(key).ToList();
2022-04-10 16:52:10 +08:00
}
public static void SetUserPerms(string key, object data)
{
CacheHelper.SetCache(key, data);
2023-06-08 11:48:04 +08:00
//RedisServer.Cache.Set(key, data);
2022-04-10 16:52:10 +08:00
}
public static void RemoveUserPerms(string key)
{
CacheHelper.Remove(key);
2023-06-08 11:48:04 +08:00
//RedisServer.Cache.Del(key);
2022-04-10 16:52:10 +08:00
}
#endregion
}
}