function EntityStorageBase::buildNotFoundCacheId

Builds the cache ID entity IDs that are not found.

Parameters

string|int $id: Entity ID for which the cache ID should be built.

Return value

string Cache ID that can be passed to the cache backend.

3 calls to EntityStorageBase::buildNotFoundCacheId()
EntityStorageBase::getNotFoundFromStaticCache in core/lib/Drupal/Core/Entity/EntityStorageBase.php
Gets not found entities from the static cache.
EntityStorageBase::resetCache in core/lib/Drupal/Core/Entity/EntityStorageBase.php
Resets the internal entity cache.
EntityStorageBase::setNotFoundStaticCache in core/lib/Drupal/Core/Entity/EntityStorageBase.php
Stores not found entities in the static entity cache.

File

core/lib/Drupal/Core/Entity/EntityStorageBase.php, line 166

Class

EntityStorageBase
A base entity storage class.

Namespace

Drupal\Core\Entity

Code

protected function buildNotFoundCacheId(string|int $id) : string {
  // Ensure that any overrides of ::buildCacheId() are reflected here too.
  return "not_found:" . $this->buildCacheId($id);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.