X-Git-Url: https://git.m6w6.name/?a=blobdiff_plain;f=app%2Fbootstrap%2Fgithub.php;h=e0defa7bc5482da1f53c647431470e25e1e43eca;hb=82b3a99da8ac38202fbaec48e6688164f787d9ad;hp=04396fb6cfaf30a1b849439c269150e68a5099ee;hpb=26494fb5cdfb9cf103904d10b6bda564bcf2d0bd;p=pharext%2Fpharext.org diff --git a/app/bootstrap/github.php b/app/bootstrap/github.php index 04396fb..e0defa7 100644 --- a/app/bootstrap/github.php +++ b/app/bootstrap/github.php @@ -16,10 +16,21 @@ $injector->share(Github\API::class) $config->$basic->auth->toArray(), 0); } + // FIXME: configure through app.ini + try { + $cache = new Github\Storage\Redis("gh-cache"); + } catch (\Exception $ex) { + try { + $cache = new Github\Storage\Memcache("gh-cache"); + } catch (\Exception $ex) { + $cache = null; + } + } return new Github\API( - $config->github - ,new Github\Storage\Session("gh-tokens") - #,new Github\Storage\Memcache("gh-cache") + $config->github + ,new Github\Logger($config) + ,new Github\Storage\Session("gh-tokens") + ,$cache ); });