public Role getRole(String id) {
        return roleCache.get(id, key -> roleRepository.findById(key).orElseThrow(NullPointerException::new));
    }
getRole

@param id id
@return Role
src/main/java/com/tuituidan/openhub/service/CacheService.java