public Mono<Boolean> isBlocked(
            @NotNull Long ownerId,
            @NotNull Long relatedUserId,
            boolean preferCache) {
        try {
            Validator.notNull(ownerId, "ownerId");
            Validator.notNull(relatedUserId, "relatedUserId");
        } catch (ResponseException e) {
            return Mono.error(e);
        }
        Pair<Long, Long> cacheKey = Pair.of(ownerId, relatedUserId);
        if (preferCache) {
            Boolean isBlocked = ownerIdAndRelatedUserIdToIsBlockedCache.getIfPresent(cacheKey);
            if (isBlocked != null) {
                return Mono.just(isBlocked);
            }
        }
        return userRelationshipRepository.isBlocked(ownerId, relatedUserId)
                .doOnNext(isBlocked -> {
                    if (isBlocked) {
                        ownerIdAndRelatedUserIdToHasRelationshipAndNotBlockedCache.put(cacheKey,
                                false);
                    }
                    ownerIdAndRelatedUserIdToIsBlockedCache.put(cacheKey, isBlocked);
                });
    }
@return true if a new relationship is created.
turms-service/src/main/java/im/turms/service/domain/user/service/UserRelationshipService.java