public Mono<Boolean> hasRelationshipAndNotBlocked(
            @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 hasRelationshipAndNotBlocked =
                    ownerIdAndRelatedUserIdToHasRelationshipAndNotBlockedCache
                            .getIfPresent(cacheKey);
            if (hasRelationshipAndNotBlocked != null) {
                return Mono.just(hasRelationshipAndNotBlocked);
            }
        }
        return userRelationshipRepository.hasRelationshipAndNotBlocked(ownerId, relatedUserId)
                .doOnNext(hasRelationshipAndNotBlocked -> {
                    ownerIdAndRelatedUserIdToHasRelationshipAndNotBlockedCache.put(cacheKey,
                            hasRelationshipAndNotBlocked);
                    if (hasRelationshipAndNotBlocked) {
                        ownerIdAndRelatedUserIdToIsBlockedCache.put(cacheKey, false);
                    }
                });
    }
The method exists for backward compatibility
turms-service/src/main/java/im/turms/service/domain/user/service/UserRelationshipService.java