wudege/sil
Composer 安装命令:
composer require wudege/sil
包简介
Single Instance Lock based Redis
README 文档
README
Single Instance Lock based Redis
INSTALL
- Use the composer command or the composer.json file. That's the recommend way. And the SDK is here
wudege/sil
$ composer require wudege/sil
USAGE
require __DIR__ . '/../vendor/autoload.php'; $config = array( 'host' => '127.0.0.1', 'port' => 6379, 'database' => 5, ); $client = new \Predis\Client($config); $lock = new \Sil\RedisSingleInstanceLock($client); $lock->acquireLock('lock-example', sha1(uniqid(mt_rand(), true)), 3000);
TEST
$ ./vendor/bin/phpunit tests/Sil/Tests
LICENSE
The MIT License (MIT). License File.
统计信息
- 总下载量: 10
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-02-05