I've noticed that author asks about redis, not predis, but I found simplest "out-of-box" way for 3.4.*, if you just want a quick start:
doctrine:
orm:
default_entity_manager: default
entity_managers:
default:
metadata_cache_driver:
type: predis
host: '%app.redis.host%'
port: '%app.redis.port%'
database: 1
result_cache_driver:
cache_provider: doctrine.orm.default_metadata_cache
query_cache_driver:
cache_provider: doctrine.orm.default_metadata_cache
This requires predis client:
$ composer require predis/predis
What happens now? For doctrine metadata cache we have Predis\Client wrapped by built-in Doctrine\Common\Cache\PredisCache. Result and query cache drivers configured as aliases for metadata cache driver (aliases to cache provider, actually), so they all use same database, host and port. If you clear metadata cache by bin/console or call flushdb directly by redis-cli, cache for results and queries also will be erased.
This solution doesn't require any new services.