[Cache] fix logic for fetching tag versions on TagAwareAdapter
This commit is contained in:
parent
278f40f48d
commit
d3790cadcd
@ -345,6 +345,7 @@ class TagAwareAdapter implements TagAwareAdapterInterface, PruneableInterface, R
|
||||
foreach ($tagVersions as $tag => $version) {
|
||||
$tags[$tag.static::TAGS_PREFIX] = $tag;
|
||||
if ($fetchTagVersions || !isset($this->knownTagVersions[$tag])) {
|
||||
$fetchTagVersions = true;
|
||||
continue;
|
||||
}
|
||||
$version -= $this->knownTagVersions[$tag][1];
|
||||
|
@ -69,6 +69,12 @@ class TagAwareAdapterTest extends AdapterTestCase
|
||||
$this->assertFalse($pool->getItem('i1')->isHit());
|
||||
$this->assertFalse($pool->getItem('i3')->isHit());
|
||||
$this->assertTrue($pool->getItem('foo')->isHit());
|
||||
|
||||
$anotherPoolInstance = $this->createCachePool();
|
||||
|
||||
$this->assertFalse($anotherPoolInstance->getItem('i1')->isHit());
|
||||
$this->assertFalse($anotherPoolInstance->getItem('i3')->isHit());
|
||||
$this->assertTrue($anotherPoolInstance->getItem('foo')->isHit());
|
||||
}
|
||||
|
||||
public function testInvalidateCommits()
|
||||
|
Reference in New Issue
Block a user