From bade710cba1dc5d1318d7b871d268836583cb778 Mon Sep 17 00:00:00 2001 From: chthomas Date: Fri, 16 Oct 2020 17:54:10 -0400 Subject: [PATCH] Bust cache key for major releases --- src/Resolvers/Cached.php | 2 +- tests/Integration/ResolversTest.php | 2 +- tests/Unit/Resolvers/CachedTest.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Resolvers/Cached.php b/src/Resolvers/Cached.php index 7cd84cf..707d4e4 100644 --- a/src/Resolvers/Cached.php +++ b/src/Resolvers/Cached.php @@ -29,7 +29,7 @@ final class Cached extends ResolverAbstract /** * Bump this number on breaking changes to invalidate cache */ - private const NAMESPACE = 'php-dns-v3'; + private const NAMESPACE = 'php-dns-v4'; private ?int $ttlSeconds; diff --git a/tests/Integration/ResolversTest.php b/tests/Integration/ResolversTest.php index 8b82e3c..8205c9e 100644 --- a/tests/Integration/ResolversTest.php +++ b/tests/Integration/ResolversTest.php @@ -196,7 +196,7 @@ public function cachesDNSLookups(): void $resolver = $this->createCachedResolver($cache); $resolver->flush(); - $cacheKey = md5('php-dns-v3:facebook.com.:A'); + $cacheKey = md5('php-dns-v4:facebook.com.:A'); $this->assertFalse($cache->getItem($cacheKey)->isHit()); diff --git a/tests/Unit/Resolvers/CachedTest.php b/tests/Unit/Resolvers/CachedTest.php index b2a9e12..a9128e6 100644 --- a/tests/Unit/Resolvers/CachedTest.php +++ b/tests/Unit/Resolvers/CachedTest.php @@ -77,7 +77,7 @@ protected function setUp(): void $this->cacheItem = $this->createMock(CacheItemInterface::class); $this->cache = $this->createMock(CacheItemPoolInterface::class); $this->cache->method('getItem') - ->with('b88c8bc912d8b285807eb4461c6d04e6') + ->with('a7e06a7e6216ad8ce85b0fcfb4a91582') ->willReturnCallback(function () { return $this->cacheItem; });