wudege / sil
Single Instance Lock based Redis
Installs: 10
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/wudege/sil
Requires
- php: ^5.6 || ^7.0
- predis/predis: ^1.1
Requires (Dev)
- phpunit/phpunit: ^5.6
- satooshi/php-coveralls: ^1.0
- squizlabs/php_codesniffer: ^2.7
This package is not auto-updated.
Last update: 2025-09-28 07:37:30 UTC
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.