#110864 Конфигурация yii для работы с кластерным redis

This commit is contained in:
2025-04-14 17:53:24 +03:00
parent 1e3c0631d7
commit 55cd4c5ddb
2 changed files with 14 additions and 9 deletions

View File

@@ -4,6 +4,7 @@ namespace dominion\cache;
use Yii;
use Predis\Client;
use yii\helpers\Inflector;
class Connection extends \yii\redis\Connection
{
@@ -14,7 +15,7 @@ class Connection extends \yii\redis\Connection
/**
* @var mixed Options to configure some behaviours of the client.
*/
public $options;
public $options = [];
/**
* @var Client redis socket connection
@@ -34,7 +35,7 @@ class Connection extends \yii\redis\Connection
public function executeCommand($name, $params = [])
{
$this->open();
Yii::debug("Executing Redis Command: {$name} ". implode(' ', $params), __METHOD__);
Yii::debug("Executing Redis Command: {$name} " . implode(' ', $params), __METHOD__);
return $this->_socket->executeCommand(
$this->_socket->createCommand($name, $params)
);