Skip to content

Commit

Permalink
Always return location IDs from SwitchableHttpCachePurger::purge
Browse files Browse the repository at this point in the history
eZ Publish Legacy expects that `content/cache` events always return location
IDs they were given (https://github.com/ezsystems/ezpublish-legacy/blob/master/kernel/classes/ezcontentcachemanager.php#L772).

In eZ Publish kernel 6.x, there was an InstantCachePurger that did this
(https://github.com/ezsystems/ezpublish-kernel/blob/6.13/eZ/Publish/Core/MVC/Symfony/Cache/Http/InstantCachePurger.php#L61-L66),
but in 7.0 (and presumably with 6.x with new HttpCacheBundle turned on),
this does not happen.

So here, we make sure that location IDs are always returned, no matter what.
  • Loading branch information
emodric authored Dec 22, 2017
1 parent 5ce5b8d commit 6ef3a5f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bundle/Cache/SwitchableHttpCachePurger.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ public function purge($locationIds)
return $locationIds;
}

return $this->purgeClient->purge($locationIds);
$this->purgeClient->purge($locationIds);

return $locationIds;
}

public function purgeAll()
Expand Down

0 comments on commit 6ef3a5f

Please sign in to comment.