From 1d96b96828c8f5d2675eca8d1924c04240d7b246 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Thu, 7 Jul 2011 07:42:06 -0700 Subject: [PATCH] Force memcached cache driver to return null as default. --- system/cache/driver/memcached.php | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/system/cache/driver/memcached.php b/system/cache/driver/memcached.php index 22834727..0ada37db 100644 --- a/system/cache/driver/memcached.php +++ b/system/cache/driver/memcached.php @@ -24,30 +24,20 @@ public function has($key) * Get an item from the cache. * * @param string $key - * @param mixed $default * @return mixed */ - public function get($key, $default = null) + public function get($key) { - // -------------------------------------------------- - // If the item has already been loaded, return it. - // -------------------------------------------------- if (array_key_exists($key, $this->items)) { return $this->items[$key]; } - // -------------------------------------------------- - // Attempt to the get the item from cache. - // -------------------------------------------------- $cache = \System\Memcached::instance()->get(\System\Config::get('cache.key').$key); - // -------------------------------------------------- - // Verify that the item was retrieved. - // -------------------------------------------------- if ($cache === false) { - return $default; + return null; } return $this->items[$key] = $cache;