eZ\Publish\Core\MVC\Symfony\Cache\PurgeClientInterface::purge PHP Method

purge() public method

It's up to the implementor to decide whether to purge $locationIds right away or to delegate to a separate process.
public purge ( array $locationIds )
$locationIds array Cache resource(s) to purge (e.g. array of URI to purge in a reverse proxy)
    public function purge($locationIds);

Usage Example

 public function purgeForContent($contentId)
 {
     $contentInfo = $this->contentService->loadContentInfo($contentId);
     $event = new ContentCacheClearEvent($contentInfo);
     $this->eventDispatcher->dispatch(MVCEvents::CACHE_CLEAR_CONTENT, $event);
     $locationIds = [];
     foreach ($event->getLocationsToClear() as $location) {
         $locationIds[] = $location->id;
     }
     $this->purgeClient->purge(array_unique($locationIds));
 }
All Usage Examples Of eZ\Publish\Core\MVC\Symfony\Cache\PurgeClientInterface::purge
PurgeClientInterface