Skip to content

Commit

Permalink
adjust rediscluster constant
Browse files Browse the repository at this point in the history
  • Loading branch information
huy.lehuu committed Nov 14, 2024
1 parent 8cadd6f commit 9bcb7f6
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/Phpfastcache/Drivers/Rediscluster/Driver.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
use Phpfastcache\Entities\DriverStatistic;
use Phpfastcache\Exceptions\PhpfastcacheLogicException;
use RedisCluster;
use Redis;

/**
* @property RedisCluster $instance
Expand Down Expand Up @@ -104,10 +105,10 @@ protected function driverConnect(): bool
$this->getConfig()->getPassword()
);

$this->instance->setOption(RedisCluster::OPT_SCAN, RedisCluster::SCAN_RETRY);
$this->instance->setOption(Redis::OPT_SCAN, Redis::SCAN_RETRY);

if ($this->getConfig()->getOptPrefix()) {
$this->instance->setOption(RedisCluster::OPT_PREFIX, $this->getConfig()->getOptPrefix());
$this->instance->setOption(Redis::OPT_PREFIX, $this->getConfig()->getOptPrefix());
}

if ($this->getConfig()->getSlaveFailover()) {
Expand Down

0 comments on commit 9bcb7f6

Please sign in to comment.