From 25ebe9fb97ee67c8b98830241e20f691790b20ab Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Mon, 8 Aug 2011 11:14:53 -0500 Subject: [PATCH] Refactor the memcache class. --- system/memcached.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/system/memcached.php b/system/memcached.php index 95350311..5156e825 100644 --- a/system/memcached.php +++ b/system/memcached.php @@ -16,7 +16,12 @@ class Memcached { */ public static function instance() { - return ( ! is_null(static::$instance)) ? static::$instance : static::$instance = static::connect(Config::get('cache.servers')); + if (is_null(static::$instance)) + { + static::$instance = static::connect(Config::get('cache.servers')); + } + + return static::$instance; } /**