ZrAdminNetCore/ZR.Service/System/CacheService.cs
2023-06-08 11:48:04 +08:00

30 lines
771 B
C#

using System.Collections.Generic;
using System.Linq;
using ZR.Common;
using ZR.Common.Cache;
namespace ZR.Service.System
{
public class CacheService
{
#region
public static List<string> GetUserPerms(string key)
{
return (List<string>)CacheHelper.GetCache(key);
//return RedisServer.Cache.Get<List<string>>(key).ToList();
}
public static void SetUserPerms(string key, object data)
{
CacheHelper.SetCache(key, data);
//RedisServer.Cache.Set(key, data);
}
public static void RemoveUserPerms(string key)
{
CacheHelper.Remove(key);
//RedisServer.Cache.Del(key);
}
#endregion
}
}