public Optional<RedisKeyGenerator> getRedisKeyGenerator(final String prefix) {
        return Optional.ofNullable(keyGeneratorMap.get(prefix));
    }
Gets redis key generator.

@param prefix the key
@return the redis key generator
support/cas-server-support-redis-ticket-registry/src/main/java/org/apereo/cas/ticket/registry/key/RedisKeyGeneratorFactory.java