Commit 25ebe9fb authored by Taylor Otwell's avatar Taylor Otwell

Refactor the memcache class.

parent 4243e721
...@@ -16,7 +16,12 @@ class Memcached { ...@@ -16,7 +16,12 @@ class Memcached {
*/ */
public static function instance() 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;
} }
/** /**
......
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