| 1 | <?php |
||
| 20 | final class RedisStorage implements StorageInterface |
||
| 21 | { |
||
| 22 | /** |
||
| 23 | * @var Redis |
||
| 24 | */ |
||
| 25 | private $redis; |
||
| 26 | |||
| 27 | 4 | public function __construct(Redis $redis) |
|
| 31 | |||
| 32 | /** |
||
| 33 | * {@inheritdoc} |
||
| 34 | */ |
||
| 35 | 3 | public function get(string $key, $default = false) |
|
| 45 | |||
| 46 | /** |
||
| 47 | * {@inheritdoc} |
||
| 48 | */ |
||
| 49 | 3 | public function set(string $key, $value, int $ttl) |
|
| 53 | |||
| 54 | /** |
||
| 55 | * {@inheritdoc} |
||
| 56 | */ |
||
| 57 | 1 | public function increment(string $key, int $by) |
|
| 61 | |||
| 62 | /** |
||
| 63 | * {@inheritdoc} |
||
| 64 | */ |
||
| 65 | 1 | public function ttl(string $key) : int |
|
| 69 | } |
||
| 70 |