public static List <C_Permission> 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 static List <C_Permission> GetPermission(int userId) { var list = PermissionCacher.GetIfExist(userId); if (list.Any()) { return(list); } var result = PermissionDataCore.GetPermission(userId); PermissionCacher.AddCache(userId, result); return(result); }