PhpRedis.php in Redis 7
Same filename in this branch
Same filename and directory in other branches
File
lib/Redis/Client/PhpRedis.phpView source
<?php
/**
* PhpRedis client specific implementation.
*/
class Redis_Client_PhpRedis implements Redis_Client_Interface {
public function getClient($host = NULL, $port = NULL, $base = NULL) {
$client = new Redis();
$client
->connect($host, $port);
if (isset($base)) {
$client
->select($base);
}
// Do not allow PhpRedis serialize itself data, we are going to do it
// ourself. This will ensure less memory footprint on Redis size when
// we will attempt to store small values.
$client
->setOption(Redis::OPT_SERIALIZER, Redis::SERIALIZER_NONE);
return $client;
}
public function getName() {
return 'PhpRedis';
}
}
Classes
Name | Description |
---|---|
Redis_Client_PhpRedis | PhpRedis client specific implementation. |