refactoring. added redis drivers.
This commit is contained in:
@@ -71,11 +71,9 @@ return array(
|
||||
| Laravel Caching Components
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| The following components are used by the wonderfully, simple Laravel
|
||||
| caching system. Each driver is resolved through the container.
|
||||
|
|
||||
| New cache drivers may be added to the framework by simply registering
|
||||
| them into the container.
|
||||
| The following components are used by the wonderfully simple Laravel cache
|
||||
| system. Each driver is resolved through the container, so new drivers may
|
||||
| be added by simply registering them in the container.
|
||||
|
|
||||
*/
|
||||
|
||||
@@ -91,6 +89,12 @@ return array(
|
||||
}),
|
||||
|
||||
|
||||
'laravel.cache.redis' => array('resolver' => function()
|
||||
{
|
||||
return new Cache\Drivers\Redis(Redis::db());
|
||||
}),
|
||||
|
||||
|
||||
'laravel.cache.memcached' => array('resolver' => function($c)
|
||||
{
|
||||
return new Cache\Drivers\Memcached($c->core('cache.memcache.connection'), Config::get('cache.key'));
|
||||
@@ -130,10 +134,6 @@ return array(
|
||||
| from the session driver, as well as examining the payload validitiy
|
||||
| and things like the CSRF token.
|
||||
|
|
||||
| Like the caching components, each session driver is resolved via the
|
||||
| container and new drivers may be added by registering them into the
|
||||
| container. Several session drivers are "driven" by the cache drivers.
|
||||
|
|
||||
*/
|
||||
|
||||
'laravel.session.transporter' => array('resolver' => function($c)
|
||||
@@ -166,6 +166,12 @@ return array(
|
||||
}),
|
||||
|
||||
|
||||
'laravel.session.redis' => array('resolver' => function($c)
|
||||
{
|
||||
return new Session\Drivers\Redis($c->core('cache.redis'));
|
||||
}),
|
||||
|
||||
|
||||
'laravel.session.memcached' => array('resolver' => function($c)
|
||||
{
|
||||
return new Session\Drivers\Memcached($c->core('cache.memcached'));
|
||||
|
||||
Reference in New Issue
Block a user