static function init() { if (null === self::$memcache) { self::$memcache = new Memcache(); self::$memcache->connect(self::HOST, self::PORT); } return self::$memcache; }
private static function init() { self::$error_code = self::INIT_SUCCESS; if (empty(self::$mc)) { self::$mc = new CloudMemcache(); if (self::$mc == false) { self::$error_code = self::ERROR_INIT; return false; } } }
public function __construct() { if (NULL === self::$memcache) { self::$memcache = new Memcache(); self::$memcache->connect(self::HOST, self::PORT); } }