fix : redis multi
This commit is contained in:
@@ -83,6 +83,29 @@ class RedisCache
|
|||||||
return $this->delete($key, $poolName);
|
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
|
// | key
|
||||||
|
|||||||
Reference in New Issue
Block a user