Skip to content

Commit 1767ab8

Browse files
committed
MC-32929: Site is down when Redis uses all allowed memory
1 parent 1116437 commit 1767ab8

File tree

1 file changed

+17
-3
lines changed
  • lib/internal/Magento/Framework/Cache/Backend

1 file changed

+17
-3
lines changed

lib/internal/Magento/Framework/Cache/Backend/Redis.php

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,11 +73,25 @@ public function load($id, $doNotTestCacheValidity = false)
7373
public function save($data, $id, $tags = [], $specificLifetime = false)
7474
{
7575
try {
76-
parent::save($data, $id, $tags, $specificLifetime);
76+
$result = parent::save($data, $id, $tags, $specificLifetime);
7777
} catch (\Throwable $exception) {
78-
return false;
78+
$result = false;
7979
}
8080

81-
return true;
81+
return $result;
82+
}
83+
84+
/**
85+
* @inheritDoc
86+
*/
87+
public function remove($id)
88+
{
89+
try {
90+
$result = parent::remove($id);
91+
} catch (\Throwable $exception) {
92+
$result = false;
93+
}
94+
95+
return $result;
8296
}
8397
}

0 commit comments

Comments
 (0)