PHPackages                             link1st/laravel-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. [Caching](/categories/caching)
4. /
5. link1st/laravel-redis

ActiveLibrary[Caching](/categories/caching)

link1st/laravel-redis
=====================

laravel-redis

043PHP

Since Aug 26Pushed 8y ago1 watchersCompare

[ Source](https://github.com/link1st/laravel-redis)[ Packagist](https://packagist.org/packages/link1st/laravel-redis)[ RSS](/packages/link1st-laravel-redis/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

laravel-redis
=============

[](#laravel-redis)

laravel-redis，本laravel包使用的是**PHPRedis 需要开启Redis扩展才能使用**,非predis

能提升代码执行效率，对应常见的**string**类型的get和set方法支持数组

配置**laravel-ide-helper**一起使用有代码提示

支持redis集群

安装
--

[](#安装)

加载包

`"link1st/laravel-redis": "dev-master"`

或

`composer require link1st/laravel-redis`

在配置文件中添加 **config/app.php**

```
    'providers' => [
        /**
         * 添加供应商
         */
        link1st\RedisCache\RedisCacheServiceProvider::class,
    ],
    'aliases' => [
         /**
          * 添加别名
          */
        'RedisCache' => link1st\RedisCache\Facades\RedisCache::class,
    ],
```

生成配置文件

`php artisan vendor:publish`

设置参数 **config/redis\_cache.php**

使用
--

[](#使用)

- **默认reids连接**

```
// set 第二个参数可以为数组 第三个参数为ttl时间，默认不设置过期时间
\RedisCache::set('name',['name'=>'xiaoming']);

// get 返回一个数组
\RedisCache::get('name');

```

- **切换redis连接**

```
// - 需要提前在 redis_cache.php 配置redis连接
\RedisCache::openRedis('redis_config1')->get('name'));

$redis = \RedisCache::openRedis('redis_config1');
$redis->get('name');

```

###  Health Score

21

—

LowBetter than 17% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/0b190747fdca7a550f54938501f583c64cb461bebdfa87932514dc30cd25efb4?d=identicon)[link1st](/maintainers/link1st)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/link1st-laravel-redis/health.svg)

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

###  Alternatives

[iazaran/smart-cache

Smart Cache is a caching optimization package designed to enhance the way your Laravel application handles data caching. It intelligently manages large data sets by compressing, chunking, or applying other optimization strategies to keep your application performant and efficient.

21114.2k](/packages/iazaran-smart-cache)

PHPackages © 2026

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