feat : site

This commit is contained in:
2025-03-14 15:15:01 +08:00
parent f93bd105b4
commit 1c3a52350a

View File

@@ -318,19 +318,15 @@ class RedisCache
* 设置多个key-value 的 hash值
* @param $key
* @param $hashKeys
* @param null $expire
* @param string $poolName
* @return bool|Redis
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
* @throws RedisException
*/
public function hMset($key, $hashKeys, $expire = null, string $poolName = RedisCode::DEFAULT_DB)
public function hMset($key, $hashKeys, string $poolName = RedisCode::DEFAULT_DB)
{
$result = $this->getRedis($poolName)->hMset($key, $hashKeys);
if ($expire) {
$this->getRedis($poolName)->expire($key, $expire);
}
return $result;
}
@@ -353,19 +349,15 @@ class RedisCache
* @param $key
* @param $hashKey
* @param $hashValue
* @param int $expire
* @param string $poolName
* @return bool|int|Redis
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
* @throws RedisException
*/
public function hSet($key, $hashKey, $hashValue, int $expire = 0, string $poolName = RedisCode::DEFAULT_DB)
public function hSet($key, $hashKey, $hashValue, string $poolName = RedisCode::DEFAULT_DB)
{
$result = $this->getRedis($poolName)->hSet($key, $hashKey, $hashValue);
if ($expire) {
$this->getRedis($poolName)->expire($key, $expire);
}
return $result;
}