PHPackages                             limslock/lock - 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. limslock/lock

ActiveLibary[Caching](/categories/caching)

limslock/lock
=============

redis lock https://github.com/zhaocong6/lock 根据大佬修车工修改完成

1.0.1(8y ago)021MITPHPPHP &gt;=5.4

Since Jun 22Pushed 7y ago1 watchersCompare

[ Source](https://github.com/limingshang/redislock)[ Packagist](https://packagist.org/packages/limslock/lock)[ RSS](/packages/limslock-lock/feed)WikiDiscussions master Synced 2w ago

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

redislock
=========

[](#redislock)

```
基于tp5  如果其他框架请修改config.php配置
安装地址
composer require limslock/lock

基于predis类
如需自己安装predis请执行
composer require predis/predis
tp5扩展，如需其他请自行配置Config.php

```

单队列调用 每次只执行一个消息，多余消息将直接返回队列被抛出异常：单队列已被占用！请稍后
--------------------------------------------

[](#单队列调用--每次只执行一个消息多余消息将直接返回队列被抛出异常单队列已被占用请稍后)

```
$lock=new Lock();
$lock->queueLock(
    function ($redis){
        echo "hello word!";
        sleep(10);
    },
    "hello",
    50
);

```

多队列调用 可持续写入消息，当超过最大队列消息，将会抛出异常：队列已被占满，请等待处理完毕后重试
------------------------------------------------

[](#多队列调用-可持续写入消息当超过最大队列消息将会抛出异常队列已被占满请等待处理完毕后重试)

```
$lock->lock(
    function ($redis){
        echo "hello word!";
        sleep(10);
    },
    "hello",
    50,
    3
);

```

#### 备注

[](#备注)

```
6-22  2：15 修改命名空间
6-22  2：38 修改readme.me

```

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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

2930d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/15756007?v=4)[李明尚](/maintainers/limingshang)[@limingshang](https://github.com/limingshang)

---

Top Contributors

[![limingshang](https://avatars.githubusercontent.com/u/15756007?v=4)](https://github.com/limingshang "limingshang (14 commits)")

### Embed Badge

![Health badge](/badges/limslock-lock/health.svg)

```
[![Health](https://phpackages.com/badges/limslock-lock/health.svg)](https://phpackages.com/packages/limslock-lock)
```

###  Alternatives

[unopim/unopim

UnoPim Laravel PIM

10.5k2.2k](/packages/unopim-unopim)[rhubarbgroup/redis-cache

A persistent object cache backend for WordPress powered by Redis. Supports Predis, PhpRedis, Relay, replication, sentinels, clustering and WP-CLI.

52999.8k1](/packages/rhubarbgroup-redis-cache)[symfony-bundles/redis-bundle

Symfony Redis Bundle

271.2M6](/packages/symfony-bundles-redis-bundle)[pdffiller/qless-php

PHP Bindings for qless

29113.7k1](/packages/pdffiller-qless-php)[millipress/millicache

WordPress Full-Page Cache based on Rules &amp; Flags. Delivers flexible, scalable caching workflows backed by Redis and ValKey in-memory stores.

712.0k2](/packages/millipress-millicache)

PHPackages © 2026

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