| 1 | <?php |
||
| 17 | class RedisCache implements Cache |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * @var Redis |
||
| 21 | */ |
||
| 22 | private $client; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * RedisCache constructor. |
||
| 26 | * |
||
| 27 | * @param Redis $client |
||
| 28 | */ |
||
| 29 | public function __construct(Redis $client) |
||
| 33 | |||
| 34 | /** |
||
| 35 | * {@inheritdoc} |
||
| 36 | */ |
||
| 37 | public function delete($key) |
||
| 41 | |||
| 42 | /** |
||
| 43 | * {@inheritdoc} |
||
| 44 | */ |
||
| 45 | public function set($key, $value, $timeToLive = 0) |
||
| 53 | |||
| 54 | /** |
||
| 55 | * {@inheritdoc} |
||
| 56 | */ |
||
| 57 | public function has($key) |
||
| 61 | |||
| 62 | /** |
||
| 63 | * {@inheritdoc} |
||
| 64 | */ |
||
| 65 | public function get($key) |
||
| 75 | |||
| 76 | /** |
||
| 77 | * {@inheritdoc} |
||
| 78 | */ |
||
| 79 | public function pull($key, $default = null) |
||
| 87 | } |
||
| 88 |