1 | <?php |
||
18 | class Redis extends AbstractCache |
||
19 | { |
||
20 | |||
21 | protected $client; |
||
22 | |||
23 | protected $params = array(); |
||
24 | |||
25 | protected $redisOptions = [ |
||
26 | PhpRedis::OPT_SERIALIZER => PhpRedis::SERIALIZER_PHP |
||
27 | ]; |
||
28 | |||
29 | /** |
||
30 | * @param PhpRedis $params |
||
31 | */ |
||
32 | public function __construct($params = null) |
||
39 | |||
40 | /** |
||
41 | * @return PhpRedis |
||
42 | * |
||
43 | * @throws Exception |
||
44 | */ |
||
45 | public function getClient() |
||
52 | |||
53 | /** |
||
54 | * @param PhpRedis $client |
||
55 | */ |
||
56 | public function setClient(PhpRedis $client) |
||
64 | |||
65 | /** |
||
66 | * {@inheritDoc} |
||
67 | */ |
||
68 | public function get($key) |
||
72 | |||
73 | /** |
||
74 | * {@inheritDoc} |
||
75 | */ |
||
76 | public function set($key, $value, $ttl = 0) |
||
80 | |||
81 | /** |
||
82 | * {@inheritDoc} |
||
83 | */ |
||
84 | public function delete($key) |
||
88 | } |
||
89 |