You are here

public function TypePluginManager::getCacheTags in GraphQL 8.3

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 DefaultPluginManager::getCacheTags

1 call to TypePluginManager::getCacheTags()
TypePluginManager::setCachedDefinitions in src/Plugin/TypePluginManager.php
Sets a cache of plugin definitions for the decorated discovery class.

File

src/Plugin/TypePluginManager.php, line 93

Class

TypePluginManager

Namespace

Drupal\graphql\Plugin

Code

public function getCacheTags() {
  $definitions = $this
    ->getDefinitions();
  return array_reduce($definitions, function ($carry, $current) {
    if (!empty($current['schema_cache_tags'])) {
      return Cache::mergeTags($carry, $current['schema_cache_tags']);
    }
    return $carry;
  }, $this->cacheTags);
}