class Redis_Client_PhpRedis in Redis 7
Same name and namespace in other branches
- 7.3 lib/Redis/Client/PhpRedis.php \Redis_Client_PhpRedis
- 7.2 lib/Redis/Client/PhpRedis.php \Redis_Client_PhpRedis
PhpRedis client specific implementation.
Hierarchy
- class \Redis_Client_PhpRedis implements Redis_Client_Interface
Expanded class hierarchy of Redis_Client_PhpRedis
2 string references to 'Redis_Client_PhpRedis'
- phpredis.cache.inc in ./
phpredis.cache.inc - Placeholder file for using the PhpRedis cache backend. This file will also ensure the client handling API is fully loaded for lock backend.
- phpredis.lock.inc in ./
phpredis.lock.inc - Drupal core lock.inc implementation using Redis via PhpRedis extension.
File
- lib/
Redis/ Client/ PhpRedis.php, line 6
View source
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';
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Redis_Client_PhpRedis:: |
public | function |
Get the connected client instance. Overrides Redis_Client_Interface:: |
|
Redis_Client_PhpRedis:: |
public | function |
Get underlaying library name used. Overrides Redis_Client_Interface:: |