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

refactor cache driver method.

parent d59b3ad9
...@@ -30,23 +30,18 @@ class Cache { ...@@ -30,23 +30,18 @@ class Cache {
switch ($driver) switch ($driver)
{ {
case 'file': case 'file':
static::$drivers[$driver] = new Cache\File; return static::$drivers[$driver] = new Cache\File;
break;
case 'memcached': case 'memcached':
static::$drivers[$driver] = new Cache\Memcached; return static::$drivers[$driver] = new Cache\Memcached;
break;
case 'apc': case 'apc':
static::$drivers[$driver] = new Cache\APC; return static::$drivers[$driver] = new Cache\APC;
break;
default: default:
throw new \Exception("Cache driver [$driver] is not supported."); 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