I my contoller I try to clear the cache when updating a page
protected function mapDataToEntity(array $data, Project $entity): void{
$entity->setName($data['name']);
$cacheManager = $this->get('sulu_http_cache.cache_manager');
$cacheManager->invalidatePath($path, $headers);
}
I get the error message:
Attempted to call an undefined method named "get" of class "App\Controller\Admin\ProjectController". Did you mean to call e.g. "cgetAction", "getAction", "getLocale" or "getSecurityContext"?