PHPackages                             cxr/laravel-redislock - 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. cxr/laravel-redislock

ActiveLibrary

cxr/laravel-redislock
=====================

基于predis的分布式锁

v0.0.1(6y ago)113MITPHP

Since Jun 5Pushed 6y agoCompare

[ Source](https://github.com/xiaorenaishu/laravel-redislock)[ Packagist](https://packagist.org/packages/cxr/laravel-redislock)[ RSS](/packages/cxr-laravel-redislock/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

简易好用的redis分布式锁
==============

[](#简易好用的redis分布式锁)

> 支持保证原子性上锁／解锁，同端解锁保证

### 引入 composer:

[](#引入-composer)

```
 composer require "cxr/laravel-redislock"

```

### 如何使用

[](#如何使用)

> laravel 需开启 Redis Facades

```
    DistributedLock::lock('key', 3); //上锁3s，可指定连接串，默认default

    DistributedLock::unlock('key');  //解锁，可指定连接串，默认default

```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2533d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/21195871?v=4)[xiaorenaishu](/maintainers/xiaorenaishu)[@xiaorenaishu](https://github.com/xiaorenaishu)

### Embed Badge

![Health badge](/badges/cxr-laravel-redislock/health.svg)

```
[![Health](https://phpackages.com/badges/cxr-laravel-redislock/health.svg)](https://phpackages.com/packages/cxr-laravel-redislock)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
