sframe / redis
redis component
dev-master
2014-11-23 12:30 UTC
Requires
- php: >=5.3.0
This package is not auto-updated.
Last update: 2024-12-31 04:45:41 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'); ...