Commit 16a1f899 authored by Taylor Otwell's avatar Taylor Otwell

refactor cache driver method.

parent d59b3ad9
......@@ -30,23 +30,18 @@ class Cache {
switch ($driver)
{
case 'file':
static::$drivers[$driver] = new Cache\File;
break;
return static::$drivers[$driver] = new Cache\File;
case 'memcached':
static::$drivers[$driver] = new Cache\Memcached;
break;
return static::$drivers[$driver] = new Cache\Memcached;
case 'apc':
static::$drivers[$driver] = new Cache\APC;
break;
return static::$drivers[$driver] = new Cache\APC;
default:
throw new \Exception("Cache driver [$driver] is not supported.");
}
}
return static::$drivers[$driver];
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment