Skip to content

Commit

Permalink
Merge pull request #33 from remotelyliving/bug-fix
Browse files Browse the repository at this point in the history
Bust cache key for major releases
  • Loading branch information
Christian Thomas authored Oct 16, 2020
2 parents 31e49d1 + bade710 commit 7180ddc
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Resolvers/Cached.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/ResolversTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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());

Expand Down
2 changes: 1 addition & 1 deletion tests/Unit/Resolvers/CachedTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
});
Expand Down

0 comments on commit 7180ddc

Please sign in to comment.