优化登录用户权限缓存

This commit is contained in:
不做码农
2022-04-10 16:52:10 +08:00
parent 3eafab8292
commit 846652c1af
6 changed files with 51 additions and 42 deletions

View File

@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ZR.Common;
namespace ZR.Service.System
{
public class CacheService
{
#region
public static List<string> GetUserPerms(string key)
{
return (List<string>)CacheHelper.GetCache(key);
}
public static void SetUserPerms(string key, object data)
{
CacheHelper.SetCache(key, data);
}
public static void RemoveUserPerms(string key)
{
CacheHelper.Remove(key);
}
#endregion
}
}