PHPackages                             drcayman/queue - 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. drcayman/queue

ActiveLibrary[Caching](/categories/caching)

drcayman/queue
==============

基于redis的队列

2.8(5y ago)045GPL-3.0+PHPPHP &gt;=5.4

Since Aug 16Pushed 5y ago1 watchersCompare

[ Source](https://github.com/drcayman/queue)[ Packagist](https://packagist.org/packages/drcayman/queue)[ Docs](http://blog.szwyll.com)[ RSS](/packages/drcayman-queue/feed)WikiDiscussions master Synced 4d ago

READMEChangelog (9)Dependencies (1)Versions (11)Used By (0)

php redis 队列 文档
===============

[](#php-redis-队列-文档)

使用方法
====

[](#使用方法)

```
use drcayman/queue/Lite;
$config =['scheme'=>'tcp','host' => '127.0.0.1','port' => 6379,'database' => 15];
$lite = new Lite($config);
$lite->rPush($key,$data,$task_time = 0,$timeout = 0);//添加队列 返回队列条数
$lite->lPop($key);//取出队列
$lite->llen($key);//获取队列剩余条数

```

redis 连接参数
==========

[](#redis-连接参数)

scheme \[string - default: tcp\]

Specifies the protocol used to communicate with an instance of Redis. Internally the client uses the connection class associated to the specified connection scheme. By default Predis supports tcp (TCP/IP), unix (UNIX domain sockets) or http (HTTP protocol through Webdis).

host \[string - default: 127.0.0.1\]

IP or hostname of the target server. This is ignored when connecting to Redis using UNIX domain sockets.

port \[integer - default: 6379\]

TCP/IP port of the target server. This is ignored when connecting to Redis using UNIX domain sockets.

path \[string - default: not set\]

Path of the UNIX domain socket file used when connecting to Redis using UNIX domain sockets.

database \[integer - default: not set\]

Accepts a numeric value that is used by Predis to automatically select a logical database with the SELECT command.

password \[string - default: not set\]

Accepts a value used to authenticate with a Redis server protected by password with the AUTH command.

async \[boolean - default: false\]

Specifies if connections to the server is estabilished in a non-blocking way (that is, the client is not blocked while the underlying resource performs the actual connection).

persistent \[boolean - default: false\]

Specifies if the underlying connection resource should be left open when a script ends its lifecycle.

timeout \[float - default: 5.0\]

Timeout (expressed in seconds) used to connect to a Redis server after which an exception is thrown.

read\_write\_timeout \[float - default: not set\]

Timeout (expressed in seconds) used when performing read or write operations on the underlying network resource after which an exception is thrown. The default value actually depends on the underlying platform but usually it is 60 seconds.

alias \[string - default: not set\]

Identifies a connection by providing a mnemonic alias. This is mostly useful with aggregated connections such as client-side sharding (cluster) or master/slave replication.

weight \[integer - default: not set\]

Specifies a weight used to balance the distribution of keys asymmetrically across multiple servers when using client-side sharding (cluster).

iterable\_multibulk \[boolean - default: false\]

When set to true Predis returns multibulk from Redis as iterator instances instead of plain simple PHP arrays.

throw\_errors \[boolean - default: true\]

When set to true server errors generated by Redis are translated to PHP exceptions, otherwise they are returned as normal PHP objects.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity59

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

Every ~55 days

Recently: every ~121 days

Total

10

Last Release

1969d ago

Major Versions

1.0 → 2.02019-08-16

PHP version history (2 changes)1.0PHP &gt;=5.3.3

2.8PHP &gt;=5.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/e8f43f085941339818623b4203a831cb7f98780eb971a57b3525df954282a214?d=identicon)[drcayman](/maintainers/drcayman)

---

Top Contributors

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

---

Tags

redisphalapithinphp

### Embed Badge

![Health badge](/badges/drcayman-queue/health.svg)

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

###  Alternatives

[predis/predis-async

Asynchronous version of Predis

366348.4k](/packages/predis-predis-async)[rhubarbgroup/redis-cache

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

51795.3k1](/packages/rhubarbgroup-redis-cache)[monospice/laravel-redis-sentinel-drivers

Redis Sentinel integration for Laravel and Lumen.

103830.5k](/packages/monospice-laravel-redis-sentinel-drivers)[predis/service-provider

Predis service provider for the Silex microframework

68546.6k1](/packages/predis-service-provider)[jamescauwelier/psredis

Sentinel client for the popular php redis client

77392.9k5](/packages/jamescauwelier-psredis)[cache/predis-adapter

A PSR-6 cache implementation using Redis (Predis). This implementation supports tags

272.6M13](/packages/cache-predis-adapter)

PHPackages © 2026

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