diff --git a/eZ/Publish/Core/Persistence/Cache/Tests/TrashHandlerTest.php b/eZ/Publish/Core/Persistence/Cache/Tests/TrashHandlerTest.php index 0040f9ee4b..6fd51e27fc 100644 --- a/eZ/Publish/Core/Persistence/Cache/Tests/TrashHandlerTest.php +++ b/eZ/Publish/Core/Persistence/Cache/Tests/TrashHandlerTest.php @@ -122,10 +122,10 @@ public function testTrashSubtree() $versionNo = 1; $tags = [ - 'lp-' . $locationId, - 'l-' . $locationId, 'c-' . $contentId . '-v-' . $versionNo, 'c-' . $contentId, + 'lp-' . $locationId, + 'l-' . $locationId, ]; $handlerMethodName = $this->getHandlerMethodName(); @@ -168,7 +168,6 @@ public function testTrashSubtree() ->method('trashSubtree') ->with($locationId) ->willReturn(null); - $this->cacheIdentifierGeneratorMock ->expects($this->exactly(4)) ->method('generateTag') diff --git a/eZ/Publish/Core/Persistence/Cache/TrashHandler.php b/eZ/Publish/Core/Persistence/Cache/TrashHandler.php index 44377372b8..a5e03abf2b 100644 --- a/eZ/Publish/Core/Persistence/Cache/TrashHandler.php +++ b/eZ/Publish/Core/Persistence/Cache/TrashHandler.php @@ -63,14 +63,15 @@ public function trashSubtree($locationId) }, $versions); $tags = array_merge( + $versionTags, + $relationTags, [ $this->cacheIdentifierGenerator->generateTag(self::CONTENT_IDENTIFIER, [$contentId]), $this->cacheIdentifierGenerator->generateTag(self::LOCATION_PATH_IDENTIFIER, [$locationId]), $this->cacheIdentifierGenerator->generateTag(self::LOCATION_IDENTIFIER, [$locationId]), ], - $relationTags, - $versionTags ); + $this->cache->invalidateTags(array_values(array_unique($tags))); return $return;