You are here

public function UnsavedIndexConfiguration::addCacheContexts in Search API 8

Adds cache contexts.

Parameters

string[] $cache_contexts: The cache contexts to be added.

Return value

$this

Overrides RefinableCacheableDependencyInterface::addCacheContexts

File

src/UnsavedIndexConfiguration.php, line 1050

Class

UnsavedIndexConfiguration
Represents a configuration of an index that was not yet permanently saved.

Namespace

Drupal\search_api

Code

public function addCacheContexts(array $cache_contexts) {
  $this->entity
    ->addCacheContexts($cache_contexts);
  return $this;
}