You are here

public function OgMenuBlock::getCacheTags in Organic Groups Menu (OG Menu) 8

The cache tags associated with this object.

When this object is modified, these cache tags will be invalidated.

Return value

string[] A set of cache tags.

Overrides ContextAwarePluginBase::getCacheTags

File

src/Plugin/Block/OgMenuBlock.php, line 242

Class

OgMenuBlock
Provides a generic Menu block.

Namespace

Drupal\og_menu\Plugin\Block

Code

public function getCacheTags() {
  $tags = parent::getCacheTags();
  $menu_name = $this
    ->getMenuName();
  if (!empty($menu_name)) {
    $tags = Cache::mergeTags($tags, [
      $menu_name,
    ]);
  }
  return $tags;
}