CacheService.cs 649 B

12345678910111213141516171819202122232425262728
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using ZR.Common;
  7. namespace ZR.Service.System
  8. {
  9. public class CacheService
  10. {
  11. #region 用户权限 缓存
  12. public static List<string> GetUserPerms(string key)
  13. {
  14. return (List<string>)CacheHelper.GetCache(key);
  15. }
  16. public static void SetUserPerms(string key, object data)
  17. {
  18. CacheHelper.SetCache(key, data);
  19. }
  20. public static void RemoveUserPerms(string key)
  21. {
  22. CacheHelper.Remove(key);
  23. }
  24. #endregion
  25. }
  26. }