From 23d5742575acb481a2b34053f3eea6ddfe1dae6e Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 1 Aug 2011 09:15:03 -0500 Subject: [PATCH] remove item caching from cache manager. --- system/cache.php | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/system/cache.php b/system/cache.php index 4bdd1185..30e541b8 100644 --- a/system/cache.php +++ b/system/cache.php @@ -9,13 +9,6 @@ class Cache { */ 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 * cache driver will be returned as defined in the cache configuration file. @@ -66,9 +59,9 @@ class Cache { */ 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))) @@ -76,7 +69,7 @@ class Cache { return is_callable($default) ? call_user_func($default) : $default; } - return static::$items[$driver][$key] = $item; + return $item; } /** @@ -91,7 +84,7 @@ class Cache { */ 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; }