snc/SncRedisBundle — pull request #65 by jpauli (2012-09-20 09:53:37+00:00)
Title: Factory redis connection

There is a problem when using PHPredis connector.

It creates as many Redis connections as there are "clients" in the config file.
So if you have something like this for example :

```yaml
snc_redis:
clients:
default:
alias: default
type: phpredis
dsn: redis://%redis_server%/0
volatile_data:
alias: volatile_data
type: phpredis
dsn: redis://%redis_server%/0
translation:
alias: translation
type: phpredis
dsn: redis://%redis_server%/0
session:
alias: session
type: predis
dsn: redis://%redis_server%/0
```

All the clients will use a connection, its not shared, thus resulting for this example in 4 connections, and they are all done to the same Redis instance.

This patch implements a Factory for the connections for them to be shared if needed. It's quick and dirty, but it just works for us in prod environment.