client->exists($name)) { throw new EmptyRedis($name); } return $this->client->get($name); } catch (ConnectionException $exception) { throw new EmptyRedis($name, $exception); } } public function set(string $name, mixed $value, int $expirationTTL = 60 * 60 * 24): void { try { $resolution = 'EX'; if ($expirationTTL === -1) { $resolution = null; $expirationTTL = null; } $this->client->set($name, $value, $resolution, $expirationTTL); } catch (ConnectionException) { return; } } }