public List <AtomPermissionMiniModel> GetPermission(int userId) { //var list = PermissionCacher.GetIfExist(userId); //if (list.Any()) return list; var result = PermissionDataCore.GetPermission(userId); PermissionCacher.AddCache(userId, result); return(result); }
public List <AtomPermissionModel> GetPermission(string roleCode) { var list = PermissionCacher.GetIfExist(roleCode); if (list.Any()) { return(list); } var result = PermissionDataCore.GetPermission(roleCode); PermissionCacher.AddCache(roleCode, result); return(result); }
public List <AtomPermissionModel> GetAppPermission(int userId) { var list = PermissionCacher.GetAppIfExist(userId); if (list.Any()) { return(list); } var result = PermissionDataCore.GetAppPermission(userId); PermissionCacher.AddAppCache(userId, result); return(result); }