dflydev / dflydev-doctrine-orm-service-provider

Doctrine ORM Service Provider
MIT License
209 stars 59 forks source link

lazyload connect to redis? #91

Open bashilbers opened 6 years ago

bashilbers commented 6 years ago

Not really an issue, just a question:

Concerning this line: https://github.com/dflydev/dflydev-doctrine-orm-service-provider/blob/master/src/Dflydev/Provider/DoctrineOrm/DoctrineOrmServiceProvider.php#L304

I want to generate proxies using a container that has no link to a Redis container. In my config I have configured a redis cache with host and port which results in the orm.cache.factory.redis to automatically try and call ->connect() and ->auth() on the Redis instance.

Is there a way to only call connect() and auth() when needed?