realbattletoad/yii2-redis
Composer 安装命令:
composer require realbattletoad/yii2-redis
包简介
README 文档
README
Fork of trorg/yii2-redis
Simple integration of phpredis.
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist realbattletoad/yii2-redis:"1.*"
or add
"realbattletoad/yii2-redis": "1.*"
to the require section of your composer.json.
Configuration
To use this extension, you have to configure the Connection class in your application configuration:
Simple, with one server
return [ //.... 'components' => [ 'redis' => [ 'class' => 'realbattletoad\yii2\redis\Connection', 'servers' => [ 'server1:6379', ], ], ] ];
Redis cluster or Array distribution or Sentinels
return [ //.... 'components' => [ 'redis' => [ 'class' => 'realbattletoad\yii2\redis\Connection', 'servers' => [ 'server1:6379', 'server2:6379', 'server3:6379', ], 'cluster' => 'redis', // or 'array' // or 'sentinels' ], ] ];
统计信息
- 总下载量: 12
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-07-15