diff --git a/core/lib/Drupal/Core/Cache/MemoryBackend.php b/core/lib/Drupal/Core/Cache/MemoryBackend.php index 09454d78505..c1276923754 100644 --- a/core/lib/Drupal/Core/Cache/MemoryBackend.php +++ b/core/lib/Drupal/Core/Cache/MemoryBackend.php @@ -156,7 +156,8 @@ class MemoryBackend implements CacheBackendInterface, CacheTagsInvalidatorInterf * {@inheritdoc} */ public function invalidateMultiple(array $cids) { - foreach ($cids as $cid) { + $items = array_intersect_key($this->cache, array_flip($cids)); + foreach ($items as $cid => $item) { $this->cache[$cid]->expire = $this->getRequestTime() - 1; } }