77
88/**
99 * @method static bool Set(string $key, mixed $value, array $optional = []) 设置缓存值
10- * @method static mixed Get(string $key, mixed $default = null) 获取缓存值
10+ * @method static Get(string $key, mixed $default = null) 获取缓存值
1111 * @method static array Del(string ...$keys) 移除缓存
1212 * @method static array Keys(null|string $regex = null) 获取缓存键
13- * @method static bool|int|float Incr(string $key, int|float $value = 1, int $ttl = 0) 自增
14- * @method static bool|int|float Decr(string $key, int|float $value = 1, int $ttl = 0) 自减
13+ * @method static bool|int|float Incr(string $key, $value = 1, int $ttl = 0) 自增
14+ * @method static bool|int|float Decr(string $key, $value = 1, int $ttl = 0) 自减
1515 * @method static array Exists(string ...$keys) 判断缓存键
1616 *
1717 * @method static void Search(string $regex, Closure $handler, int $chunkSize = 100) 搜索键值 - 正则匹配
@@ -199,7 +199,7 @@ protected static function _Atomic(string $lockKey, Closure $handler, bool $block
199199 * ]
200200 * @return bool
201201 */
202- protected static function _Set (string $ key , mixed $ value , array $ optional = []): bool
202+ protected static function _Set (string $ key , $ value , array $ optional = []): bool
203203 {
204204 $ ttl = intval ($ optional ['EX ' ] ?? (isset ($ optional ['EXAT ' ]) ? ($ optional ['EXAT ' ] - time ()) : 0 ));
205205 if (in_array ('NX ' , $ optional )) {
@@ -234,7 +234,7 @@ protected static function _Set(string $key, mixed $value, array $optional = []):
234234 * @param int $ttl
235235 * @return bool|int|float
236236 */
237- protected static function _Incr (string $ key , int | float $ value = 1 , int $ ttl = 0 ): bool | int | float
237+ protected static function _Incr (string $ key , $ value = 1 , int $ ttl = 0 )
238238 {
239239 $ func = __FUNCTION__ ;
240240 $ result = false ;
@@ -265,7 +265,7 @@ protected static function _Incr(string $key, int|float $value = 1, int $ttl = 0)
265265 * @param int $ttl
266266 * @return bool|int|float
267267 */
268- protected static function _Decr (string $ key , int | float $ value = 1 , int $ ttl = 0 ): bool | int | float
268+ protected static function _Decr (string $ key , $ value = 1 , int $ ttl = 0 )
269269 {
270270 $ func = __FUNCTION__ ;
271271 $ result = false ;
@@ -308,7 +308,7 @@ protected static function _Exists(string ...$key): array
308308 * @param mixed|null $default
309309 * @return mixed
310310 */
311- protected static function _Get (string $ key , mixed $ default = null ): mixed
311+ protected static function _Get (string $ key , $ default = null )
312312 {
313313 $ res = apcu_fetch ($ key , $ success );
314314 return $ success ? $ res : $ default ;
@@ -331,7 +331,7 @@ protected static function _Del(string ...$keys): array
331331 * @param string|null $regex
332332 * @return array
333333 */
334- protected static function _Keys (null | string $ regex = null ): array
334+ protected static function _Keys (? string $ regex = null ): array
335335 {
336336 $ keys = [];
337337 if ($ info = apcu_cache_info ()) {
0 commit comments