/** * {@inheritdoc} */ public function getCacheKeys() { // Add a key for the active menu trail. $menu = $this->getDerivativeId(); $active_trail = $this->menuTree->getActiveTrailIds($menu); $active_trail_key = 'trail.' . implode('|', $active_trail); return array_merge(parent::getCacheKeys(), array($active_trail_key)); }