You are here

public function TermStorage::resetCache in Drupal 8

Same name and namespace in other branches
  1. 9 core/modules/taxonomy/src/TermStorage.php \Drupal\taxonomy\TermStorage::resetCache()
  2. 10 core/modules/taxonomy/src/TermStorage.php \Drupal\taxonomy\TermStorage::resetCache()

Resets the internal, static entity cache.

Parameters

$ids: (optional) If specified, the cache is reset for the entities with the given ids only.

Overrides ContentEntityStorageBase::resetCache

File

core/modules/taxonomy/src/TermStorage.php, line 82

Class

TermStorage
Defines a Controller class for taxonomy terms.

Namespace

Drupal\taxonomy

Code

public function resetCache(array $ids = NULL) {
  drupal_static_reset('taxonomy_term_count_nodes');
  $this->ancestors = [];
  $this->treeChildren = [];
  $this->treeParents = [];
  $this->treeTerms = [];
  $this->trees = [];
  $this->vocabularyHierarchyType = [];
  parent::resetCache($ids);
}