Skip to content

Commit 82b22da

Browse files
committed
Issue #3017753 by mxr576, alexpott: MemoryBackend should validate the passed cids
(cherry picked from commit 76bb511)
1 parent bd41ec0 commit 82b22da

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/Drupal/Core/Cache/MemoryBackend.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,8 @@ public function invalidate($cid) {
156156
* {@inheritdoc}
157157
*/
158158
public function invalidateMultiple(array $cids) {
159-
foreach ($cids as $cid) {
159+
$items = array_intersect_key($this->cache, array_flip($cids));
160+
foreach ($items as $cid => $item) {
160161
$this->cache[$cid]->expire = $this->getRequestTime() - 1;
161162
}
162163
}

0 commit comments

Comments
 (0)