fix : redis multi

This commit is contained in:
2024-12-25 17:52:30 +08:00
parent b2ec16a50a
commit 7ba9106712

View File

@@ -83,6 +83,29 @@ class RedisCache
return $this->delete($key, $poolName);
}
/**
* 接下来的操作启用原子操作 - 事物开启
* @param string $poolName
* @return bool|Redis
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function multi(string $poolName = 'default'): bool|Redis
{
return $this->getRedis($poolName)->multi();
}
/**
* 结束原子操作 - 事物结束
* @param string $poolName
* @return Redis|array|false
* @throws ContainerExceptionInterface
* @throws NotFoundExceptionInterface
*/
public function exec(string$poolName = 'default'): Redis|array|false
{
return $this->getRedis($poolName)->exec();
}
// +--------------------------------------------------------------------------------------------------------------------------------------------
// | key