| 1 | <?php |
||
| 13 | class RedisDriver implements DriverInterface |
||
| 14 | { |
||
| 15 | /** |
||
| 16 | * @var \Redis |
||
| 17 | */ |
||
| 18 | protected $redis; |
||
| 19 | |||
| 20 | /** |
||
| 21 | * @var int |
||
| 22 | */ |
||
| 23 | protected $hits; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * @var int |
||
| 27 | */ |
||
| 28 | protected $misses; |
||
| 29 | |||
| 30 | 3 | public function __construct($redis) |
|
| 36 | |||
| 37 | /** |
||
| 38 | * @return \Redis |
||
| 39 | */ |
||
| 40 | 2 | public function getRedis() |
|
| 44 | |||
| 45 | /** |
||
| 46 | * @inheritDoc |
||
| 47 | */ |
||
| 48 | 1 | public function set(string $key, string $value, int $ttl) : bool |
|
| 52 | |||
| 53 | /** |
||
| 54 | * @inheritDoc |
||
| 55 | */ |
||
| 56 | 2 | public function get(string $key) |
|
| 68 | |||
| 69 | /** |
||
| 70 | * @inheritDoc |
||
| 71 | */ |
||
| 72 | 1 | public function delete(string $key) : bool |
|
| 76 | |||
| 77 | /** |
||
| 78 | * @inheritDoc |
||
| 79 | */ |
||
| 80 | 1 | public function buildKey(array $parts) : string |
|
| 84 | |||
| 85 | /** |
||
| 86 | * @inheritDoc |
||
| 87 | */ |
||
| 88 | 1 | public function getStatistics() : array |
|
| 95 | |||
| 96 | } |
||
| 97 |