Final Class Yiisoft\Mutex\Redis\RedisMutexFactory
| Inheritance | Yiisoft\ |
|---|
Allows creating {@see RedisMutex} mutex objects.
Public Methods
| Method | Description | Defined By |
|---|---|---|
| __construct() | Yiisoft\ |
|
| create() | Yiisoft\ |
Method Details
| public mixed __construct ( \ | ||
| $client | \ |
Predis client instance to use. |
| $ttl | integer |
Number of seconds in which the lock will be auto released. |
public function __construct(ClientInterface $client, int $ttl = 30)
{
$this->client = $client;
$this->ttl = $ttl;
}
User Contributed Notes
Leave a comment
Join the conversation to share a note.