src/Adapter/PhpredisAdapter.php 1 location
|
@@ 50-59 (lines=10) @@
|
| 47 |
|
return $this->client; |
| 48 |
|
} |
| 49 |
|
|
| 50 |
|
public function get(string $key) |
| 51 |
|
{ |
| 52 |
|
$result = $this->getClient()->get($key); |
| 53 |
|
|
| 54 |
|
if ($result === false && !$this->getClient()->exists($key)) { |
| 55 |
|
throw new KeyNotFoundException(); |
| 56 |
|
} |
| 57 |
|
|
| 58 |
|
return $result; |
| 59 |
|
} |
| 60 |
|
|
| 61 |
|
public function getMulti(array $keys): array |
| 62 |
|
{ |
src/Adapter/RedisAdapter.php 1 location
|
@@ 48-57 (lines=10) @@
|
| 45 |
|
return $this->client; |
| 46 |
|
} |
| 47 |
|
|
| 48 |
|
public function get(string $key) |
| 49 |
|
{ |
| 50 |
|
$value = $this->getClient()->get($key); |
| 51 |
|
|
| 52 |
|
if ($value === null && !$this->getClient()->exists($key)) { |
| 53 |
|
throw new KeyNotFoundException(); |
| 54 |
|
} |
| 55 |
|
|
| 56 |
|
return $value; |
| 57 |
|
} |
| 58 |
|
|
| 59 |
|
public function getMulti(array $keys): array |
| 60 |
|
{ |