@Override
    public void delete(final String username) {
        val redisKeyPattern = RedisCompositeKey.forPrincipals().withPrincipal(username).toKeyPattern();
        val accounts = casRedisTemplates.getPrincipalsRedisTemplate().boundSetOps(redisKeyPattern).members();
        casRedisTemplates.getAccountsRedisTemplate().executePipelined((RedisCallback<Object>) connection -> {
            Objects.requireNonNull(accounts).forEach(account -> {
                val accountKey = RedisCompositeKey.forAccounts().withAccount(account).toKeyPattern();
                connection.keyCommands().del(accountKey.getBytes(StandardCharsets.UTF_8));
            });
            return null;
        });
        casRedisTemplates.getPrincipalsRedisTemplate().delete(redisKeyPattern);
    }
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