ISysCacheService.cs 869 B

123456789101112131415161718192021222324252627282930313233343536
  1. using System.Collections.Generic;
  2. using System.Threading.Tasks;
  3. namespace Admin.NET.Core.Service
  4. {
  5. public interface ISysCacheService
  6. {
  7. Task AddCacheKey(string cacheKey);
  8. Task DelByPatternAsync(string key);
  9. Task DelCacheKey(string cacheKey);
  10. bool Exists(string cacheKey);
  11. Task<List<string>> GetAllCacheKeys();
  12. Task<T> GetAsync<T>(string cacheKey);
  13. Task<string> GetStringAsync(string cacheKey);
  14. Task RemoveAsync(string key);
  15. Task SetAsync(string cacheKey, object value);
  16. Task SetStringAsync(string cacheKey, string value);
  17. Task<List<long>> GetOrgIdList(long userId);
  18. Task SetOrgIdList(long userId, List<long> orgIdList);
  19. Task<List<string>> GetPermission(long userId);
  20. Task SetPermission(long userId, List<string> permissions);
  21. }
  22. }