Override version of CacheRedis
This commit is contained in:
parent
450845067f
commit
d828e1fbc4
24
override/classes/cache/CacheRedis.php
vendored
24
override/classes/cache/CacheRedis.php
vendored
@ -37,17 +37,21 @@ class CacheRedis extends CacheCore
|
||||
}
|
||||
|
||||
if (class_exists('\\Predis\\Client') && extension_loaded('redis')) {
|
||||
$this->redis = new Predis\Client([
|
||||
$parameters = [
|
||||
'scheme' => 'tcp',
|
||||
'host' => _REDIS_HOST_,
|
||||
'port' => _REDIS_PORT_,
|
||||
]/*, [
|
||||
'profile' => '2.8',
|
||||
]*/);
|
||||
//'database' => 0
|
||||
];
|
||||
$options = [
|
||||
//'profile' => '2.8',
|
||||
//'prefix' => '',
|
||||
];
|
||||
$this->redis = new Predis\Client($parameters, $options);
|
||||
} else {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
//$this->is_connected = $this->redis->isConnected();
|
||||
|
||||
$info = $this->redis->info('server');
|
||||
@ -114,10 +118,10 @@ class CacheRedis extends CacheCore
|
||||
protected function _writeKeys()
|
||||
{
|
||||
/*if (!$this->is_connected) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;*/
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;*/
|
||||
}
|
||||
|
||||
/**
|
||||
@ -128,7 +132,7 @@ class CacheRedis extends CacheCore
|
||||
if (!$this->is_connected) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
return $this->redis->flushdb();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user