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