function EntityStorageBase::buildCacheId

Same name in other branches
  1. 9 core/lib/Drupal/Core/Entity/EntityStorageBase.php \Drupal\Core\Entity\EntityStorageBase::buildCacheId()
  2. 10 core/lib/Drupal/Core/Entity/EntityStorageBase.php \Drupal\Core\Entity\EntityStorageBase::buildCacheId()
  3. 11.x core/lib/Drupal/Core/Entity/EntityStorageBase.php \Drupal\Core\Entity\EntityStorageBase::buildCacheId()

Builds the cache ID for the passed in entity ID.

Parameters

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.

7 calls to EntityStorageBase::buildCacheId()
ConfigEntityStorage::buildCacheId in core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php
Builds the cache ID for the passed in entity ID.
ContentEntityStorageBase::getFromPersistentCache in core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php
Gets entities from the persistent cache backend.
ContentEntityStorageBase::resetCache in core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php
Resets the internal, static entity cache.
ContentEntityStorageBase::setPersistentCache in core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php
Stores entities in the persistent cache backend.
EntityStorageBase::getFromStaticCache in core/lib/Drupal/Core/Entity/EntityStorageBase.php
Gets entities from the static cache.

... See full list

1 method overrides EntityStorageBase::buildCacheId()
ConfigEntityStorage::buildCacheId in core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php
Builds the cache ID for the passed in entity ID.

File

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

Class

EntityStorageBase
A base entity storage class.

Namespace

Drupal\Core\Entity

Code

protected function buildCacheId($id) {
    return "values:{$this->entityTypeId}:{$id}";
}

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