You are here

public function MenuLinkContentVisibilityCache::getCacheMaxAge in Custom Menu Links Visibility 8

File

src/MenuLinkContentVisibilityCache.php, line 70

Class

MenuLinkContentVisibilityCache

Namespace

Drupal\menu_link_content_visibility

Code

public function getCacheMaxAge() {
  $cache_max_age = Cache::PERMANENT;
  foreach ($this->conditions as $condition) {
    $cache_max_age = Cache::mergeMaxAges($cache_max_age, $condition
      ->getCacheMaxAge());
  }
  return $cache_max_age;
}