diff --git a/lib/Github/Client.php b/lib/Github/Client.php index 3ec9f9bf82e..41e6a150d35 100644 --- a/lib/Github/Client.php +++ b/lib/Github/Client.php @@ -402,12 +402,14 @@ public function addHeaders(array $headers) /** * Add a cache plugin to cache responses locally. + * * @param CacheItemPoolInterface $cache + * @param array $config */ - public function addCache(CacheItemPoolInterface $cachePool) + public function addCache(CacheItemPoolInterface $cachePool, array $config = []) { $this->removeCache(); - $this->addPlugin(new Plugin\CachePlugin($cachePool, $this->streamFactory)); + $this->addPlugin(new Plugin\CachePlugin($cachePool, $this->streamFactory, $config)); } /**