2024-06-07 11:04:26 +08:00
|
|
|
|
using ZR.Common;
|
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
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|