function EntityStorageBase::setNotFoundStaticCache
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Entity/EntityStorageBase.php \Drupal\Core\Entity\EntityStorageBase::setNotFoundStaticCache()
Stores not found entities in the static entity cache.
Parameters
array $remaining_ids: Not found entity IDs to store in the cache.
1 call to EntityStorageBase::setNotFoundStaticCache()
- EntityStorageBase::loadMultiple in core/
lib/ Drupal/ Core/ Entity/ EntityStorageBase.php - Loads one or more entities.
File
-
core/
lib/ Drupal/ Core/ Entity/ EntityStorageBase.php, line 223
Class
- EntityStorageBase
- A base entity storage class.
Namespace
Drupal\Core\EntityCode
protected function setNotFoundStaticCache(array $remaining_ids) : void {
if ($this->entityType
->isStaticallyCacheable()) {
foreach ($remaining_ids as $id) {
$this->memoryCache
->set($this->buildNotFoundCacheId($id), FALSE, MemoryCacheInterface::CACHE_PERMANENT, [
$this->memoryCacheTag,
]);
}
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.