public static function create() { if (self::$instance === null) { self::$instance = new self(); } return self::$instance; }
public static function getUsableCache() { self::init(); $instance = null; if (!defined("ENVIRONMENT") || ENVIRONMENT !== PRODUCTION) { $instance = Sabel_Cache_Null::create(); } elseif (self::$support["apc"]) { $instance = Sabel_Cache_Apc::create(); } elseif (self::$support["xcache"]) { $instance = Sabel_Cache_Xcache::create(); } elseif (self::$support["memcache"]) { $instance = Sabel_Cache_Memcache::create(); } else { $instance = Sabel_Cache_File::create(); } return $instance; }