Skip to content

Commit

Permalink
Added cache for menu
Browse files Browse the repository at this point in the history
  • Loading branch information
damianz5 committed Jul 6, 2018
1 parent ff02a84 commit 0e7cfcb
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/AppBundle/Controller/MenuController.php
Expand Up @@ -72,11 +72,14 @@ public function getChildNodesAction($template, $pathString = null)

$pathArray = $pathString ? explode("/", $pathString) : [];

$response = new Response();
$response->setVary('X-User-Hash');

return $this->templating->renderResponse(
$template, [
'menuItems' => $menuItems,
'pathArray' => $pathArray,
], new Response()
'menuItems' => $menuItems,
'pathArray' => $pathArray,
], $response
);
}
}

0 comments on commit 0e7cfcb

Please sign in to comment.