Skip to content

Asynchronous redis client library for PHP. Built-in connection pool.

Notifications You must be signed in to change notification settings

yushuiying/redis-async

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

redis-async

  • event-based, asynchronous non-blocking
  • built-in connection pool
  • support concurrent requests

How to use

####1. Install swoole extension

pecl install swoole

####2. Run example code

require __DIR__.'/src/Swoole/Async/RedisClient.php';
$redis = new Swoole\Async\RedisClient('127.0.0.1');

$redis->select('2', function () use ($redis) {
    $redis->set('key', 'value-rango', function ($result, $success) use ($redis) {
        for ($i = 0; $i < 3; $i++) {
            $redis->get('key', function ($result, $success) {
                echo "redis ok:\n";
                var_dump($success, $result);
            });
        }
    });
});

About

Asynchronous redis client library for PHP. Built-in connection pool.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%