yii2-cmslib / redis
Redis class, For yii2 extention. Support multiple configuration.
Installs: 40
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 3
Forks: 0
Open Issues: 1
Type:yii2-extension
Requires
- yiisoft/yii2: *
This package is auto-updated.
Last update: 2024-12-04 21:51:52 UTC
README
2015/12/02 add file Redis.php
usage: echo <<< EOT
use \Yii2cms\lib\RedisClass;
$redis=RedisClass::getInstance();
//$redis=RedisClass::getInstance('cms_slave');
//$redis=RedisClass::getInstance('msgque_slave');
var_dump($redis);
var_dump($redis->get($key));
EOT
[notes]
Yii2中Redis配置文件格式 (\Yii::$app->params['redis'])
如下:
$redisCon = [
'msgque_master' => [
'host' => '10.15.209.110',
'port' => '6379'
],
'msgque_slave' => [
'host' => '10.15.209.119',
'port' => '6379'
],
....
];
over