Commit 23d57425 authored by Taylor Otwell's avatar Taylor Otwell

remove item caching from cache manager.

parent 5f3d40b7
...@@ -9,13 +9,6 @@ class Cache { ...@@ -9,13 +9,6 @@ class Cache {
*/ */
public static $drivers = array(); public static $drivers = array();
/**
* All of the items retrieved by the cache drivers.
*
* @var array
*/
public static $items = array();
/** /**
* Get a cache driver instance. If no driver name is specified, the default * Get a cache driver instance. If no driver name is specified, the default
* cache driver will be returned as defined in the cache configuration file. * cache driver will be returned as defined in the cache configuration file.
...@@ -66,9 +59,9 @@ class Cache { ...@@ -66,9 +59,9 @@ class Cache {
*/ */
public static function get($key, $default = null, $driver = null) public static function get($key, $default = null, $driver = null)
{ {
if (isset(static::$items[$driver][$key])) if (is_null($driver))
{ {
return static::$items[$driver][$key]; $driver = Config::get('cache.driver');
} }
if (is_null($item = static::driver($driver)->get($key))) if (is_null($item = static::driver($driver)->get($key)))
...@@ -76,7 +69,7 @@ class Cache { ...@@ -76,7 +69,7 @@ class Cache {
return is_callable($default) ? call_user_func($default) : $default; return is_callable($default) ? call_user_func($default) : $default;
} }
return static::$items[$driver][$key] = $item; return $item;
} }
/** /**
...@@ -91,7 +84,7 @@ class Cache { ...@@ -91,7 +84,7 @@ class Cache {
*/ */
public static function remember($key, $default, $minutes, $driver = null) public static function remember($key, $default, $minutes, $driver = null)
{ {
if ( ! is_null($item = static::get($key))) if ( ! is_null($item = static::get($key, null, $driver)))
{ {
return $item; return $item;
} }
......
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