...
|
...
|
@@ -70,6 +70,18 @@ trait RedisQuery { |
|
|
return $this->getClient()->set($key,$this->serialize($val),$ttl);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 设置 缓存过期时间
|
|
|
* @param $key
|
|
|
* @param int $ttl
|
|
|
* @return bool
|
|
|
* @author:dc
|
|
|
* @time 2024/7/8 11:50
|
|
|
*/
|
|
|
public function expire($key,$ttl = -1){
|
|
|
return $this->getClient()->expire($key,$ttl);
|
|
|
}
|
|
|
|
|
|
|
|
|
/**
|
|
|
* 如果有key返回false,没有则新增
|
...
|
...
|
|