private static function create() { if (empty(self::$cacheInstance)) { $sCachingMethod = \General\Config::getInstance()->get('cacheMethod'); if ($sCachingMethod === 'apc' && !(extension_loaded('apc') && ini_get('apc.enabled'))) { $sCachingMethod = 'Mem'; } switch ($sCachingMethod) { case 'Apc': self::$cacheInstance = Apc::getInstance(); break; case 'Memcached': self::$cacheInstance = Memcached::getInstance(); break; default: self::$cacheInstance = Variable::getInstance(); break; } } }