public List<Role> getRolesByCategoryId(String categoryId) {
        Set<String> roleIds = categoryRolesCache.get(categoryId, id ->
                roleCategoryRepository.findByCategoryId(id).stream()
                        .map(RoleCategory::getRoleId)
                        .collect(Collectors.toSet())
        );
        if (CollectionUtils.isEmpty(roleIds)) {
            return Collections.emptyList();
        }
        return roleIds.stream().map(this::getRole).collect(Collectors.toList());
    }
getRolesByCategoryId

@param categoryId categoryId
@return List
src/main/java/com/tuituidan/openhub/service/CacheService.java