PHPackages                             ice-php/redis - 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. [Database &amp; ORM](/categories/database)
4. /
5. ice-php/redis

ActiveComposer[Database &amp; ORM](/categories/database)

ice-php/redis
=============

对Redis功能进行封装

1841PHP

Since Dec 3Pushed 7y ago1 watchersCompare

[ Source](https://github.com/ice-php/redis)[ Packagist](https://packagist.org/packages/ice-php/redis)[ RSS](/packages/ice-php-redis/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

对Redis进行封装
==========

[](#对redis进行封装)

- 配置

    本模块使用redis配置数组,其中应包含hostname,port,以及可选的password
- 任意类型值的存储与取出

    $obj-&gt;redis(string $key, $value = null, bool $replace = true, int $expire = 0): RedisJson

    以上将以JSON格式对value值进行存储, 并可通过以下方法读取

    redis(string $key)

    或

    $obj-&gt;get()
- 字符串类型的存储与取出

    $string=redisString(string $key, ?string $value = null, bool $replace = true, int $expire = 0): RedisString

    可通过以下方法读取

    redisString(string $key)

    或

    $string-&gt;get()
- 整数类型的存储与取出

    redisInt(string $key, ?int $value = null, bool $replace = true, int $expire = 0): RedisInt
- 浮点类型的存储与取出

    redisFloat(string $key, ?float $value = null, bool $replace = true, int $expire = 0): RedisFloat
- 位 类型的存储与取出

    redisBit(string $key, ?int $value = null, bool $replace = true, int $expire = 0): RedisBit
- Hash(键值对)的存储与取出

    redisHash(string $key, ?array $fields = null): RedisHash
- List(有序数组)的存储与取出

    redisList(string $key, ?array $values = null): RedisList
- Set(集合)的存储与取出

    redisSet(string $key, $members = null): RedisSet
- SortedSet(有序集合)的存储与取出

    redisSortedSet(string $key, array $members = null): RedisSortedSet
- 删除一个存储键或多个

    redisDelete(...$keys): int
- 判断是否存在指定的键

    redisExists(string $key): bool

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity39

Early-stage or recently created project

 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.

### Community

Maintainers

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

---

Top Contributors

[![ice-php](https://avatars.githubusercontent.com/u/23303429?v=4)](https://github.com/ice-php "ice-php (37 commits)")

### Embed Badge

![Health badge](/badges/ice-php-redis/health.svg)

```
[![Health](https://phpackages.com/badges/ice-php-redis/health.svg)](https://phpackages.com/packages/ice-php-redis)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M546](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M211](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

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