public static function GetInstance() { if (!self::$instance) { self::$instance = new Predis_Client(array('host' => REDIS_HOST, 'port' => REDIS_PORT, 'database' => REDIS_DATABASE, 'password' => REDIS_PASSWORD)); if (REDIS_PASSWORD) { //self::$instance->auth(REDIS_PASSWORD); } } return self::$instance; }