PHPackages                             lvht/pea - 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. lvht/pea

Abandoned → [angejia/pea](/?search=angejia%2Fpea)Library

lvht/pea
========

Eloquent Cache Layer

v0.0.20(10y ago)831021[6 issues](https://github.com/lvht/pea/issues)[1 PRs](https://github.com/lvht/pea/pulls)MITPHP

Since Dec 8Pushed 8y ago9 watchersCompare

[ Source](https://github.com/lvht/pea)[ Packagist](https://packagist.org/packages/lvht/pea)[ RSS](/packages/lvht-pea/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (4)Versions (21)Used By (0)

pea
===

[](#pea)

[![Join the chat at https://gitter.im/angejia/pea](https://camo.githubusercontent.com/0c9b765a205be0498829867e45959bd61880afd5e6826ab4a181512e51949eb5/68747470733a2f2f6261646765732e6769747465722e696d2f616e67656a69612f7065612e737667)](https://gitter.im/angejia/pea?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)[![Build Status](https://camo.githubusercontent.com/0e98e68dca7f747cc1653f266d15ef5ea11d29d9b74f6efdc75aca399aa45bad/68747470733a2f2f7472617669732d63692e6f72672f616e67656a69612f7065612e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/angejia/pea)

Laravel Eloquent 的缓存层。

特色
--

[](#特色)

- 行级缓存
- 表级缓存
- 自动过期

更多细节参考[wiki](../../wiki)。

安装
--

[](#安装)

```
composer require angejia/pea:dev-master

```

使用
--

[](#使用)

在`config/app.php`中添加`Angejia\Pea\ServiceProvider`，然后使用`Angejia\Pea\Model`替换`Illuminate\Database\Eloquent\Model`。 最后在模型中设置`protected`属性`$needCache`为`true`即可开启缓存支持。

```
class UserModel extends \Angejia\Pea\Model
{
    protected $needCache = true;
}
```

如果你有专门的 Redis 缓存实例，可以通过`config/database.php`指定。具体参见[wiki](../../wiki/Laravel-%E9%85%8D%E7%BD%AE)。

---

[安个家](http://www.angejia.com/)出品。

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 98.1% 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 ~4 days

Recently: every ~14 days

Total

20

Last Release

3719d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/88784a5e09bb664bce6c25a861dcf8207df61c3ac6c13805f33dc126a80e91c7?d=identicon)[lvht](/maintainers/lvht)

---

Top Contributors

[![taoso](https://avatars.githubusercontent.com/u/2030591?v=4)](https://github.com/taoso "taoso (53 commits)")[![gitter-badger](https://avatars.githubusercontent.com/u/8518239?v=4)](https://github.com/gitter-badger "gitter-badger (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/lvht-pea/health.svg)

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

###  Alternatives

[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k12.1M99](/packages/laravel-pulse)[owen-it/laravel-auditing

Audit changes of your Eloquent models in Laravel

3.4k33.0M95](/packages/owen-it-laravel-auditing)[spiritix/lada-cache

A Redis based, automated and scalable database caching layer for Laravel

591444.8k2](/packages/spiritix-lada-cache)[directorytree/metrics

Record metrics in your Laravel application

26027.8k](/packages/directorytree-metrics)[fumeapp/modeltyper

Generate TypeScript interfaces from Laravel Models

196277.9k](/packages/fumeapp-modeltyper)[casbin/laravel-authz

An authorization library that supports access control models like ACL, RBAC, ABAC in Laravel.

324339.9k4](/packages/casbin-laravel-authz)

PHPackages © 2026

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