int for port numbers

This commit is contained in:
Shish 2019-10-02 00:39:45 +01:00
parent c197d021bb
commit 6ccf7b72e2

View file

@ -32,7 +32,7 @@ class MemcachedCache implements CacheEngine
#$this->memcache->setOption(Memcached::OPT_COMPRESSION, False);
#$this->memcache->setOption(Memcached::OPT_SERIALIZER, Memcached::SERIALIZER_PHP);
#$this->memcache->setOption(Memcached::OPT_PREFIX_KEY, phpversion());
$this->memcache->addServer($hp[0], $hp[1]);
$this->memcache->addServer($hp[0], (int)$hp[1]);
}
public function get(string $key)
@ -106,7 +106,7 @@ class RedisCache implements CacheEngine
{
$this->redis = new Redis();
$hp = explode(":", $args);
$this->redis->pconnect($hp[0], $hp[1]);
$this->redis->pconnect($hp[0], (int)$hp[1]);
$this->redis->setOption(Redis::OPT_SERIALIZER, Redis::SERIALIZER_PHP);
$this->redis->setOption(Redis::OPT_PREFIX, 'shm:');
}