2017 © Pedro Peláez
 

library easy-redis

an async redis wrapper for phpredis

image

shen2/easy-redis

an async redis wrapper for phpredis

  • Friday, December 29, 2017
  • by shen2
  • Repository
  • 2 Watchers
  • 6 Stars
  • 245 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 3 % Grown

The README.md

EasyRedis

an async redis wrapper for phpredis, (*1)

Features

  • Using phpredis extension (nicolasff/phpredis)
  • Support asynchronous and synchronous request
  • Support for logged, unlogged and counter batches

Installation

PHP 5.4+ is required. phpredis extension is required., (*2)

Append dependency into composer.json, (*3)

    ...
    "require": {
        ...
        "shen2/easy-redis": "dev-master"
    }
    ...

Basic Using

<?php

$config = array(
    'host'      => 'localhost',
    'port'      => 6379,
    'persistent'=> false,
    'database'  => 0,
    'profiler'  => true,
);

// Create a connection.
$redisManager = new EasyRedis\Manager($config);

// send request synchronously.
$redisManager->send('set', ['a', 'abc']);
echo $redisManager->send('get', ['a']) . "\n";

// send request asynchronously
$redisManager->sendAsync('set', ['a', 'abc']);

$redisManager->sendAsync('set', ['b', '123'])->then(function(){
    echo "successed.\n";
});

The Versions

29/12 2017

dev-master

9999999-dev

an async redis wrapper for phpredis

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-redis *

 

by Shen Zhenyu

29/12 2017

v1.0

1.0.0.0

an async redis wrapper for phpredis

  Sources   Download

MIT

The Requires

  • php >=5.4.0
  • ext-redis *

 

by Shen Zhenyu