Default to PHP serializer for Redis.

This commit is contained in:
flash 2024-04-10 23:40:14 +00:00
parent 339f9d3701
commit e4c8ed711e
2 changed files with 2 additions and 2 deletions

View file

@ -1 +1 @@
0.2404.102336
0.2404.102340

View file

@ -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());