using System.Collections.Generic;
using System.Threading.Tasks;

namespace Ewide.Core.Service
{
    public interface ISysCacheService
    {
        Task<bool> DelAsync(string key);
        Task<bool> DelByPatternAsync(string key);
        List<string> GetAllCacheKeys();
        Task<List<string>> GetDataScope(string userId);
        Task<List<AntDesignTreeNode>> GetMenu(string userId, string appCode);
        Task<List<string>> GetPermission(string userId);
        Task SetDataScope(string userId, List<string> dataScopes);
        Task SetMenu(string userId, string appCode, List<AntDesignTreeNode> menus);
        Task SetPermission(string userId, List<string> permissions);
        Task<List<SysAreaCode>> GetAreaCode();
        Task  SetAreaCode(List<SysAreaCode> areaCodes);
        Task<bool> SetAsync(string key, object value);
        Task<string> GetAsync(string key);
        Task<T> GetAsync<T>(string key);
    }
}