public function EntityStorageBase::resetCache in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Entity/EntityStorageBase.php \Drupal\Core\Entity\EntityStorageBase::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 EntityStorageInterface::resetCache
4 calls to EntityStorageBase::resetCache()
- EntityStorageBase::delete in core/
lib/ Drupal/ Core/ Entity/ EntityStorageBase.php - Deletes permanently saved entities.
- EntityStorageBase::doPostSave in core/
lib/ Drupal/ Core/ Entity/ EntityStorageBase.php - Performs post save entity processing.
- EntityStorageBase::loadUnchanged in core/
lib/ Drupal/ Core/ Entity/ EntityStorageBase.php - Loads an unchanged entity from the database.
- VocabularyStorage::resetCache in core/
modules/ taxonomy/ src/ VocabularyStorage.php - Resets the internal, static entity cache.
2 methods override EntityStorageBase::resetCache()
- ContentEntityStorageBase::resetCache in core/
lib/ Drupal/ Core/ Entity/ ContentEntityStorageBase.php - Resets the internal, static entity cache.
- VocabularyStorage::resetCache in core/
modules/ taxonomy/ src/ VocabularyStorage.php - Resets the internal, static entity cache.
File
- core/
lib/ Drupal/ Core/ Entity/ EntityStorageBase.php, line 120 - Contains \Drupal\Core\Entity\EntityStorageBase.
Class
- EntityStorageBase
- A base entity storage class.
Namespace
Drupal\Core\EntityCode
public function resetCache(array $ids = NULL) {
if ($this->entityType
->isStaticallyCacheable() && isset($ids)) {
foreach ($ids as $id) {
unset($this->entities[$id]);
}
}
else {
$this->entities = array();
}
}