public Mono<GroupType> queryGroupTypeIfActiveAndNotDeleted(
            @NotNull Long groupId,
            boolean preferCache) {
        try {
            Validator.notNull(groupId, "groupId");
        } catch (ResponseException e) {
            return Mono.error(e);
        }
        if (preferCache) {
            GroupType groupType = groupIdToGroupTypeCache.getIfPresent(groupId);
            if (groupType != null) {
                return Mono.just(groupType);
            }
        }
        return groupRepository.findTypeIdIfActiveAndNotDeleted(groupId)
                .flatMap(groupTypeService::queryGroupType)
                .doOnNext(groupType -> groupIdToGroupTypeCache.put(groupId, groupType));
    }
TODO: remove and keep {@link GroupService#queryGroupTypeIfActiveAndNotDeleted(Long, boolean)}
only.
turms-service/src/main/java/im/turms/service/domain/group/service/GroupService.java