I am using redis
as the driver for caching data. The database configuration of Laravel has the ability to define the Redis connection information.
'redis' => array(
'cluster' => true,
'default' => array(
'host' => '127.0.0.1',
'port' => 6379,
'database' => 0,
),
),
But if I wanted to have multiple connections defined and use a specific connection
to use for the cache, how can I do this on Laravel 4. There is no connection configuration on cache.php where I can specify the redis connection name. It currently has a connection
config that will be used if the cache driver is database
.
EDIT
I just went through the Laravel code and when initializing the Redis Driver, it looks like Laravel is not looking into the connection. Is my understanding correct?
http://laravel.com/api/source-class-Illuminate.Cache.CacheManager.html#63-73
protected function createRedisDriver()
{
$redis = $this->app['redis'];
return $this->repository(new RedisStore($redis, $this->getPrefix()));
}