PHPackages                             msheng/yii2-redlock - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Caching](/categories/caching)
4. /
5. msheng/yii2-redlock

ActiveYii2-extension[Caching](/categories/caching)

msheng/yii2-redlock
===================

Class for easier Redlock integration

1.0.1(9y ago)015MITPHP

Since Aug 8Pushed 9y ago1 watchersCompare

[ Source](https://github.com/Yemsheng/yii2-redlock)[ Packagist](https://packagist.org/packages/msheng/yii2-redlock)[ Docs](https://github.com/Yemsheng/yii2-redlock)[ RSS](/packages/msheng-yii2-redlock/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (4)Used By (0)

yii2-redlock
============

[](#yii2-redlock)

A redlock for Yii2, distributed locks with Redis

Based on [Redlock-rb](https://github.com/antirez/redlock-rb) by [Salvatore Sanfilippo](https://github.com/antirez) and [signe redlock-php](https://github.com/signe/redlock-php)

Installation
------------

[](#installation)

To install run:

```
    composer require "msheng/yii2-redlock:~1.0.0"

```

Or add this line to *require* section of composer.json:

```
    "msheng/yii2-redlock": "~1.0.0"

```

project
-------

[](#project)

Your project need to be an [yii2-app-advanced](https://github.com/yiisoft/yii2-app-advanced) , and here is the [guide](https://github.com/yiisoft/yii2-app-advanced/blob/master/docs/guide/start-installation.md)

main.php
--------

[](#mainphp)

In common/config/main.php or main-local.php

```
