public function ContentEntityStorageTrait::resetCache in Multiversion 8
2 calls to ContentEntityStorageTrait::resetCache()
- ContentEntityStorageTrait::delete in src/
Entity/ Storage/ ContentEntityStorageTrait.php - ContentEntityStorageTrait::loadUnchanged in src/
Entity/ Storage/ ContentEntityStorageTrait.php
File
- src/
Entity/ Storage/ ContentEntityStorageTrait.php, line 515
Class
Namespace
Drupal\multiversion\Entity\StorageCode
public function resetCache(array $ids = NULL) {
parent::resetCache($ids);
// Drupal 8.7.0 uses a memory cache bin for the static cache, so we don't
// need to do anything else.
if (version_compare(\Drupal::VERSION, '8.7', '>')) {
return;
}
$ws = $this
->getWorkspaceId();
if ($this->entityType
->isStaticallyCacheable() && isset($ids)) {
foreach ($ids as $id) {
unset($this->entities[$ws][$id]);
}
}
else {
$this->entities[$ws] = [];
}
}