@Override
    public void deleteAll() {
        var options = ScanOptions.scanOptions().match(RedisCompositeKey.forAccounts().toKeyPattern()).build();
        try (val result = casRedisTemplates.getAccountsRedisTemplate().scan(options)) {
            casRedisTemplates.getAccountsRedisTemplate().executePipelined((RedisCallback<Object>) connection -> {
                StreamSupport.stream(result.spliterator(), false)
                    .forEach(id -> connection.keyCommands().del(id.getBytes(StandardCharsets.UTF_8)));
                return null;
            });
        }
        options = ScanOptions.scanOptions().match(RedisCompositeKey.forPrincipals().toKeyPattern()).build();
        try (val result = casRedisTemplates.getPrincipalsRedisTemplate().scan(options)) {
            casRedisTemplates.getPrincipalsRedisTemplate().executePipelined((RedisCallback<Object>) connection -> {
                StreamSupport.stream(result.spliterator(), false)
                    .forEach(id -> connection.keyCommands().del(id.getBytes(StandardCharsets.UTF_8)));
                return null;
            });
        }
    }
This is {@link RedisGoogleAuthenticatorTokenCredentialRepository}.

@author Misagh Moayyed
@since 6.1.0
support/cas-server-support-gauth-redis/src/main/java/org/apereo/cas/gauth/credential/RedisGoogleAuthenticatorTokenCredentialRepository.java