eZ\Publish\Core\MVC\Symfony\Cache\GatewayCachePurger::purgeForContent PHP Method

purgeForContent() public method

Purge Content cache using $locationIds and gather additional relevant cache to clear based on $contentId.
Deprecation: in 6.5, design flaw on deleted/trashed content, use purge() when content does not exist for now. See EZP-25696 for potential future feature to solve this.
public purgeForContent ( mixed $contentId, array $locationIds = [] )
$contentId mixed Content ID.
$locationIds array Initial location id's from signal to take into account.
    public function purgeForContent($contentId, $locationIds = []);

Usage Example

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