require_once __DIR__."/config.php";
-use merry\Config;
use http\Url;
$injector->share(Github\API::class)
$config->$basic->auth->toArray(),
0);
}
+ $logger = new Github\Logger($config);
+
+ // FIXME: configure through app.ini
+ try {
+ $cache = new Github\Storage\Redis("gh-cache");
+ } catch (\Exception $ex) {
+ /* Memcached won't throw an exception */
+ $cache = new Github\Storage\Memcache("gh-cache");
+ }
return new Github\API(
- $config->github
- ,new Github\Storage\Session("gh-tokens")
- #,new Github\Storage\Memcache("gh-cache")
+ $config->github
+ ,$logger
+ ,new Github\Storage\Session("gh-tokens")
+ ,$cache
);
});