2017 © Pedro Peláez
 

yii2-extension yii2-redis

Redis component for Yii2

image

ancor/yii2-redis

Redis component for Yii2

  • Thursday, March 10, 2016
  • by ancor.dev
  • Repository
  • 1 Watchers
  • 2 Stars
  • 108 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 4 % Grown

The README.md

Redis component for Yii2

Description

This component is wrapper, it based on really powerful php-redis extension.
Please, install those php-extension before use this., (*1)

Documentation can be found at here, (*2)

Feel free to let me know what else you want added via:, (*3)

Installation

The preferred way to install this extension is through composer., (*4)

Either run, (*5)

$ php composer.phar require ancor/yii2-redis

or add, (*6)

"ancor/yii2-redis": "dev-master"

to the require section of your composer.json file., (*7)

Configuration

Configuration is easy. Add this to your main-local.php config, (*8)

'components' => [
    'redis' => \redis\redis\Redis::build(),
],

Or with settings, (*9)

'components' => [
    'redis' => \redis\redis\Redis::build([
        // 'host'    => '127.0.0.1',
        // 'port'    => 6379,
        // 'timeout' => 0,

        // 'retryInterval' => null,

        // 'password' => null,
        // 'database' => 0, // default database number
    ]),
],

Usage

$redis = Yii::$app->redis;

$redis->set('my:key', 'some-value');
$res = $redis->get('my:key');

The Versions

10/03 2016

dev-master

9999999-dev

Redis component for Yii2

  Sources   Download

GPLv3

The Requires

 

by Anton Korniychuk