diff --git a/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php b/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php index de599a7..a842990 100644 --- a/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php +++ b/core/lib/Drupal/Core/Config/Entity/ConfigStorageController.php @@ -424,14 +424,13 @@ public function save(EntityInterface $entity) { * {@inheritdoc} */ public function resetCache(array $ids = NULL) { - $context_uuid = $this->getCurrentContextUuid(); if ($this->cache && isset($ids)) { foreach ($ids as $id) { - unset($this->entityCache[$context_uuid][$id]); + unset($this->entityCache[$id]); } } else { - $this->entityCache[$context_uuid] = array(); + $this->entityCache = array(); } } @@ -440,11 +439,11 @@ public function resetCache(array $ids = NULL) { */ protected function cacheGet($ids) { $entities = array(); - $context_uuid = $this->getCurrentContextUuid(); // Load any available entities from the internal cache. - if ($this->cache && !empty($this->entityCache[$context_uuid])) { - $entities += array_intersect_key($this->entityCache[$context_uuid], array_flip($ids)); + if ($this->cache && !empty($this->entityCache)) { + $entities += array_intersect_key($this->entityCache, array_flip($ids)); } + return $entities; } @@ -453,26 +452,11 @@ protected function cacheGet($ids) { */ protected function cacheSet($entities) { if ($this->cache) { - $context_uuid = $this->getCurrentContextUuid(); - if (!isset($this->entityCache[$context_uuid])) { - $this->entityCache[$context_uuid] = array(); - } - $this->entityCache[$context_uuid] += $entities; + $this->entityCache += $entities; } } /** - * Gets the current configuration context UUID. - * - * @return string - * The UUID for the current \Drupal\Core\Config\Context\ContextInterface - * instance. - */ - protected function getCurrentContextUuid() { - return $this->configFactory->getContext()->getUuid(); - } - - /** * Invokes a hook on behalf of the entity. * * @param $hook