public function EntityStorageControllerBase::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 EntityStorageControllerInterface::resetCache

3 methods override EntityStorageControllerBase::resetCache()

File

drupal/core/lib/Drupal/Core/Entity/EntityStorageControllerBase.php, line 99
Contains \Drupal\Core\Entity\EntityStorageControllerBase.

Class

EntityStorageControllerBase
A base entity storage controller class.

Namespace

Drupal\Core\Entity

Code

public function resetCache(array $ids = NULL) {
  if ($this->cache && isset($ids)) {
    foreach ($ids as $id) {
      unset($this->entityCache[$id]);
    }
  }
  else {
    $this->entityCache = array();
  }
}