wudege/sil

Single Instance Lock based Redis

Maintainers

Details

github.com/wudege/sil

Source

Issues

Installs: 10

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/wudege/sil

v1.0.2 2017-02-05 03:21 UTC

This package is not auto-updated.

Last update: 2025-09-28 07:37:30 UTC


README

Single Instance Lock based Redis

Software License Build Status Scrutinizer Code Quality Coverage Status Latest Stable Version Total Downloads Twitter URL

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.