diff --git a/composer.json b/composer.json index c4efcee..db074ff 100644 --- a/composer.json +++ b/composer.json @@ -37,7 +37,7 @@ "php": ">=7.0", "amphp/amp": "^2", "amphp/byte-stream": "^1.1", - "amphp/cache": "^1", + "amphp/cache": "^1.2", "amphp/file": "^0.2 || ^0.3", "amphp/parser": "^1", "amphp/uri": "^0.1", diff --git a/lib/BasicResolver.php b/lib/BasicResolver.php index 8af723a..bd88ff8 100644 --- a/lib/BasicResolver.php +++ b/lib/BasicResolver.php @@ -48,7 +48,7 @@ final class BasicResolver implements Resolver { private $gcWatcher; public function __construct(Cache $cache = null, ConfigLoader $configLoader = null) { - $this->cache = $cache ?? new ArrayCache; + $this->cache = $cache ?? new ArrayCache(5000 /* default gc interval */, 256 /* size */); $this->configLoader = $configLoader ?? (\stripos(PHP_OS, "win") === 0 ? new WindowsConfigLoader : new UnixConfigLoader);