diff --git a/Neos.Cache/Classes/Backend/RedisBackend.php b/Neos.Cache/Classes/Backend/RedisBackend.php index ee0fb006c0..1229d7b381 100644 --- a/Neos.Cache/Classes/Backend/RedisBackend.php +++ b/Neos.Cache/Classes/Backend/RedisBackend.php @@ -170,7 +170,18 @@ private function calculateExpires(string $tag, int $lifetime): int */ public function get(string $entryIdentifier): string|bool { - return $this->uncompress($this->redis->get($this->getPrefixedIdentifier('entry:' . $entryIdentifier))); + $tries = 1; + do { + try { + return $this->uncompress($this->redis->get($this->getPrefixedIdentifier('entry:' . $entryIdentifier))); + } catch (\RedisException $exception) { + if ($tries > 8) { + throw $exception; + } + usleep($tries**2 * 100000); + $tries++; + } + } while (true); } /**