Skip to content

Commit

Permalink
[HttpCache] Adapt SwitchableHttpCachePurger for EZP-25003
Browse files Browse the repository at this point in the history
  • Loading branch information
andrerom committed Aug 15, 2016
1 parent 1a42f3f commit 0d95f40
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions bundle/Cache/SwitchableHttpCachePurger.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ public function __construct(GatewayCachePurger $gatewayCachePurger)
$this->gatewayCachePurger = $gatewayCachePurger;
}

public function purge($cacheElements)
public function purge($locationIds)
{
if ($this->isSwitchedOff()) {
return $cacheElements;
return $locationIds;
}

return $this->gatewayCachePurger->purge($cacheElements);
return $this->gatewayCachePurger->purge($locationIds);
}

public function purgeAll()
Expand All @@ -42,12 +42,12 @@ public function purgeAll()
$this->gatewayCachePurger->purgeAll();
}

public function purgeForContent($contentId)
public function purgeForContent($contentId, $locationIds = array())
{
if ($this->isSwitchedOff()) {
return;
}

$this->gatewayCachePurger->purgeForContent($contentId);
$this->gatewayCachePurger->purgeForContent($contentId, $locationIds);
}
}

0 comments on commit 0d95f40

Please sign in to comment.