1 | <?php |
||
18 | class RedisCache implements Cache |
||
19 | { |
||
20 | /** |
||
21 | * @var Redis |
||
22 | */ |
||
23 | private $client; |
||
24 | |||
25 | /** |
||
26 | * RedisCache constructor. |
||
27 | * |
||
28 | * @param Redis $client |
||
29 | */ |
||
30 | public function __construct(Redis $client) |
||
34 | |||
35 | /** |
||
36 | * {@inheritdoc} |
||
37 | */ |
||
38 | public function delete($key) |
||
46 | |||
47 | /** |
||
48 | * {@inheritdoc} |
||
49 | */ |
||
50 | public function set($key, $value, $timeToLive = 0) |
||
62 | |||
63 | /** |
||
64 | * {@inheritdoc} |
||
65 | */ |
||
66 | public function has($key) |
||
74 | |||
75 | /** |
||
76 | * {@inheritdoc} |
||
77 | */ |
||
78 | public function get($key) |
||
94 | |||
95 | /** |
||
96 | * {@inheritdoc} |
||
97 | */ |
||
98 | public function pull($key, $default = null) |
||
106 | } |
||
107 |