1
0
mirror of https://github.com/danog/dns.git synced 2024-11-26 20:14:51 +01:00

Update for cache beta changes

This commit is contained in:
Aaron Piotrowski 2021-12-13 16:58:54 -06:00
parent 7b2800e271
commit b0c8ccb6e4
No known key found for this signature in database
GPG Key ID: ADD1EF783EDE9EEB
4 changed files with 10 additions and 10 deletions

View File

@ -39,15 +39,15 @@
"php": ">=8",
"ext-json": "*",
"ext-filter": "*",
"amphp/amp": "v3.x-dev",
"amphp/byte-stream": "v2.x-dev",
"amphp/cache": "v2.x-dev",
"amphp/amp": "^3",
"amphp/byte-stream": "^2",
"amphp/cache": "^2",
"amphp/parser": "^1",
"amphp/windows-registry": "v1.x-dev",
"daverandom/libdns": "^2.0.1"
"amphp/windows-registry": "^1",
"daverandom/libdns": "^2.0.2"
},
"require-dev": {
"amphp/phpunit-util": "v2.x-dev",
"amphp/phpunit-util": "^3",
"phpunit/phpunit": "^9",
"amphp/php-cs-fixer-config": "dev-master"
},

View File

@ -3,8 +3,8 @@
namespace Amp\Dns\Internal;
use Amp\ByteStream\ReadableResourceStream;
use Amp\ByteStream\WritableResourceStream;
use Amp\ByteStream\StreamException;
use Amp\ByteStream\WritableResourceStream;
use Amp\CancelledException;
use Amp\DeferredFuture;
use Amp\Dns\DnsException;

View File

@ -45,7 +45,7 @@ final class TcpSocket extends Socket
}
}
public static function parser(callable $callback): \Generator
private static function parser(callable $callback): \Generator
{
$decoder = (new DecoderFactory)->create();

View File

@ -2,8 +2,8 @@
namespace Amp\Dns;
use Amp\Cache\ArrayCache;
use Amp\Cache\Cache;
use Amp\Cache\LocalCache;
use Amp\CompositeException;
use Amp\Dns\Internal\Socket;
use Amp\Dns\Internal\TcpSocket;
@ -51,7 +51,7 @@ final class Rfc1035StubResolver implements Resolver
public function __construct(Cache $cache = null, ConfigLoader $configLoader = null)
{
$this->cache = $cache ?? new ArrayCache(maxSize: 256);
$this->cache = $cache ?? new LocalCache(sizeLimit: 256);
$this->configLoader = $configLoader ?? (\stripos(PHP_OS, "win") === 0
? new WindowsConfigLoader
: new UnixConfigLoader);