Nginx-Redis 是为 nginx-perl 准备的异步 redis 客户端。
示例代码:
use Nginx::Redis;
ngx_redis ‘127.0.0.1:6379’, [‘GET’, ‘mykey’], sub { my ($reply) = @_;
unless ($reply) { warn “error: no reply from redis\n”; return; }
};