You are here

public function SearchApiQuery::getCacheTags in Search API 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 QueryPluginBase::getCacheTags

File

src/Plugin/views/query/SearchApiQuery.php, line 733

Class

SearchApiQuery
Defines a Views query class for searching on Search API indexes.

Namespace

Drupal\search_api\Plugin\views\query

Code

public function getCacheTags() {
  $tags = parent::getCacheTags();
  $query = $this
    ->getSearchApiQuery();
  if ($query instanceof CacheableDependencyInterface) {
    $tags = Cache::mergeTags($query
      ->getCacheTags(), $tags);
  }
  return $tags;
}