sframe/redis

redis component

Maintainers

Details

github.com/SIBPHP/Redis

Source

Issues

Installs: 10

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/sframe/redis

dev-master 2014-11-23 12:30 UTC

This package is not auto-updated.

Last update: 2025-10-07 09:01:54 UTC


README

Redis manager based on php_redis extension Support master/slave mode through configuration

Installation

composer require "sframe/redis:*"

Configuration

1 Server

array(
    'host' => '',       // optional, default 127.0.0.1
    'port' => '',       // optional, default 6379
    'timeout' => 0,     // optional, default 0
    'persistent' => false, // optional, default false
)

1 Master and 1 Slave

array(
    'master' => array(
        ...
    ),
    'slave' => array(
        ...
    )
)

1 Master and Multi slaves

array(
    'master' => array(
        ...
    ),
    'slaves' => array(
        array(...),
        array(...),
        ...
    )
)

demo.php

$redis = new \SFrame\Redis\Redis();
$redis->set('hello', 1);
$redis->get('hello');
$redis->delete('hello');
...