diff --git a/vendor/magento/framework/App/Backpressure/SlidingWindow/RedisRequestLogger.php b/vendor/magento/framework/App/Backpressure/SlidingWindow/RedisRequestLogger.php index 7d57d3421c7b3..a0d2d3d5bb03a 100644 --- a/vendor/magento/framework/App/Backpressure/SlidingWindow/RedisRequestLogger.php +++ b/vendor/magento/framework/App/Backpressure/SlidingWindow/RedisRequestLogger.php @@ -1,7 +1,7 @@ generateId($context, $timeSlot); + $this->redisClient->pipeline(); $this->redisClient->incrBy($id, 1); $this->redisClient->expireAt($id, time() + $discardAfter); diff --git a/vendor/magento/framework/App/Backpressure/SlidingWindow/RedisRequestLogger/RedisClient.php b/vendor/magento/framework/App/Backpressure/SlidingWindow/RedisRequestLogger/RedisClient.php index 3d1621927091d..fd1e82796f0e9 100644 --- a/vendor/magento/framework/App/Backpressure/SlidingWindow/RedisRequestLogger/RedisClient.php +++ b/vendor/magento/framework/App/Backpressure/SlidingWindow/RedisRequestLogger/RedisClient.php @@ -1,7 +1,7 @@ client = new Credis_Client( $this->getHost($config), $this->getPort($config), $this->getTimeout($config), @@ -86,8 +84,6 @@ public function __construct(DeploymentConfig $config) $this->getPassword($config), $this->getUser($config) ); - - $this->pipeline = $credisClient->pipeline(); } /** @@ -99,7 +95,7 @@ public function __construct(DeploymentConfig $config) */ public function incrBy(string $key, int $decrement) { - return $this->pipeline->incrBy($key, $decrement); + return $this->client->incrBy($key, $decrement); } /** @@ -111,7 +107,7 @@ public function incrBy(string $key, int $decrement) */ public function expireAt(string $key, int $timestamp) { - return $this->pipeline->expireAt($key, $timestamp); + return $this->client->expireAt($key, $timestamp); } /** @@ -122,7 +118,17 @@ public function expireAt(string $key, int $timestamp) */ public function get(string $key) { - return $this->pipeline->get($key); + return $this->client->get($key); + } + + /** + * Start pipeline + * + * @return void + */ + public function pipeline(): void + { + $this->client->pipeline(); } /** @@ -132,7 +138,7 @@ public function get(string $key) */ public function exec(): array { - return $this->pipeline->exec(); + return $this->client->exec(); } /**