apaoww/yii2-redis

Yii 2 Redis extension with predis

Maintainers

Package info

github.com/apaoww/yii2-redis

Type:yii2-extension

pkg:composer/apaoww/yii2-redis

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

dev-master 2022-09-14 03:22 UTC

This package is auto-updated.

Last update: 2026-02-14 10:54:07 UTC


README

Using Predis and yii2 combination This extension is fully compatible with the yii2-redis extension, and you can use predis only if you replace the configuration

Usage

  1. Change your redis component configuration, There is no need to change any of the previous code, That's all right.
'redis' => [
    'class' => pavle\yii\redis\Connection::class,
    'parameters' => ['tcp://xx.xx.x.xx:30001', 'tcp://xx.xx.x.xx:30002', 'tcp://xx.xx.x.xx:30003'],
    //'parameters' => 'tcp://192.168.2.240:6379',
    'options' => ['cluster' => 'redis'],
],

2.More usage yii2-redis Document

3.Using the predis client

Yii::$app->redis->getClient();