Skip to content

Commit

Permalink
Always return location IDs from SwitchableHttpCachePurger::purge (ezs…
Browse files Browse the repository at this point in the history
…ystems#131)

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 and andrerom committed Dec 25, 2017
1 parent 0116fce commit 1fd473e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion bundle/Cache/SwitchableHttpCachePurger.php
Expand Up @@ -30,7 +30,9 @@ public function purge($locationIds)
return $locationIds;
}

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

return $locationIds;
}

public function purgeAll()
Expand Down

0 comments on commit 1fd473e

Please sign in to comment.