1 | <?php |
||
24 | class MemcachedBucketStore extends MemcachedStore |
||
25 | { |
||
26 | /** @var string[] */ |
||
27 | protected $servers; |
||
28 | |||
29 | /** @var array */ |
||
30 | protected $options = [ |
||
31 | CURLOPT_RETURNTRANSFER => false, |
||
32 | CURLOPT_SSL_VERIFYPEER => false, |
||
33 | ]; |
||
34 | |||
35 | /** @var int */ |
||
36 | protected $port = 8091; |
||
37 | |||
38 | /** @var int */ |
||
39 | protected $timeout = 1; |
||
40 | |||
41 | /** @var string */ |
||
42 | protected $flushEndpoint = ':%s/pools/default/buckets/%s/controller/doFlush'; |
||
43 | |||
44 | /** @var array */ |
||
45 | protected $sasl = []; |
||
46 | |||
47 | /** |
||
48 | * MemcachedBucketStore constructor. |
||
49 | * |
||
50 | * @param \Memcached $memcached |
||
51 | * @param string $prefix |
||
52 | * @param array $servers |
||
53 | * @param array $sasl |
||
54 | */ |
||
55 | 10 | public function __construct( |
|
65 | |||
66 | /** |
||
67 | * Increment the value of an item in the cache. |
||
68 | * |
||
69 | * @param string $key |
||
70 | * @param mixed $value |
||
71 | * |
||
72 | * @return int|bool |
||
73 | */ |
||
74 | 4 | public function increment($key, $value = 1) |
|
86 | |||
87 | /** |
||
88 | * Decrement the value of an item in the cache. |
||
89 | * |
||
90 | * @param string $key |
||
91 | * @param mixed $value |
||
92 | * |
||
93 | * @return int|bool |
||
94 | */ |
||
95 | 4 | public function decrement($key, $value = 1) |
|
112 | |||
113 | /** |
||
114 | * {@inheritdoc} |
||
115 | */ |
||
116 | 2 | public function flush() |
|
132 | 2 | ||
133 | /** |
||
134 | * @return array |
||
135 | */ |
||
136 | protected function setCredential(): array |
||
146 | |||
147 | /** |
||
148 | * @param $handler |
||
149 | * |
||
150 | * @throws \RuntimeException |
||
151 | */ |
||
152 | protected function callMulti($handler) |
||
183 | 2 | ||
184 | /** |
||
185 | * @param int $second |
||
186 | */ |
||
187 | public function timeout(int $second) |
||
191 | |||
192 | /** |
||
193 | * @param int $port |
||
194 | */ |
||
195 | public function port(int $port) |
||
199 | } |
||
200 |