Skip to content

Commit

Permalink
Fix EZP-24854: http cache purge bans wrong/additional location ids
Browse files Browse the repository at this point in the history
  • Loading branch information
Joao Inacio committed Sep 29, 2015
1 parent b66e4fb commit 12353b4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion eZ/Publish/Core/MVC/Symfony/Cache/Http/FOSPurgeClient.php
Expand Up @@ -41,7 +41,7 @@ public function purge($locationIds)
$locationIds = array($locationIds);
}

$this->cacheManager->invalidate(array('X-Location-Id' => '(' . implode('|', $locationIds) . ')'));
$this->cacheManager->invalidate(array('X-Location-Id' => '^(' . implode('|', $locationIds) . ')$'));
}

public function purgeAll()
Expand Down
Expand Up @@ -55,7 +55,7 @@ public function testPurgeOneLocationId()
$this->cacheManager
->expects($this->once())
->method('invalidate')
->with(array('X-Location-Id' => "($locationId)"));
->with(array('X-Location-Id' => "^($locationId)$"));

$this->purgeClient->purge($locationId);
}
Expand All @@ -68,7 +68,7 @@ public function testPurge(array $locationIds)
$this->cacheManager
->expects($this->once())
->method('invalidate')
->with(array('X-Location-Id' => '(' . implode('|', $locationIds) . ')'));
->with(array('X-Location-Id' => '^(' . implode('|', $locationIds) . ')$'));

$this->purgeClient->purge($locationIds);
}
Expand Down

0 comments on commit 12353b4

Please sign in to comment.