EntityStorageBase::resetCache
public function EntityStorageBase::resetCache
public EntityStorageBase::resetCache(array $ids = NULL)
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
File
- core/lib/Drupal/Core/Entity/EntityStorageBase.php, line 115
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(); } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Entity!EntityStorageBase.php/function/EntityStorageBase::resetCache/8.1.x