function ContentEntityStorageBase::resetRevisionCache
Resets the static and persistent revision caches.
Parameters
int[] $revision_ids: The entity revision IDs to reset the static and persistent revision caches for.
1 call to ContentEntityStorageBase::resetRevisionCache()
- ContentEntityStorageBase::deleteRevision in core/
lib/ Drupal/ Core/ Entity/ ContentEntityStorageBase.php - Deletes a specific entity revision.
File
-
core/
lib/ Drupal/ Core/ Entity/ ContentEntityStorageBase.php, line 1502
Class
- ContentEntityStorageBase
- Base class for content entity storage handlers.
Namespace
Drupal\Core\EntityCode
protected function resetRevisionCache(array $revision_ids) : void {
$cache_ids = array_map(function ($revision_id) {
return $this->buildRevisionCacheId($revision_id);
}, $revision_ids);
if ($this->entityType
->isStaticallyCacheable()) {
$this->memoryCache
->deleteMultiple($cache_ids);
}
if ($this->entityType
->isPersistentlyCacheable()) {
$this->cacheBackend
->deleteMultiple($cache_ids);
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.