Default to PHP serializer for Redis.
This commit is contained in:
parent
339f9d3701
commit
e4c8ed711e
|
@ -7,7 +7,6 @@ namespace Index\Cache\Valkey;
|
|||
|
||||
use InvalidArgumentException;
|
||||
use Redis;
|
||||
use RedisException;
|
||||
use Index\Cache\ICacheProvider;
|
||||
use Index\Net\{DnsEndPoint,IPEndPoint,UnixEndPoint};
|
||||
|
||||
|
@ -22,6 +21,7 @@ class ValkeyProvider implements ICacheProvider {
|
|||
$this->persist = $providerInfo->isPersistent();
|
||||
$this->redis = new Redis;
|
||||
$this->redis->setOption(Redis::OPT_PREFIX, $providerInfo->getPrefix());
|
||||
$this->redis->setOption(Redis::OPT_SERIALIZER, Redis::SERIALIZER_PHP);
|
||||
|
||||
if($this->persist)
|
||||
$this->redis->pconnect($providerInfo->getServerHost(), $providerInfo->getServerPort());
|
||||
|
|
Loading…
Reference in a new issue