New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

angejia/pea

Eloquent Cache Layer
2,489 82
Install
composer require angejia/pea
Latest Version:v0.0.20
Laravel:5
License:MIT
Last Updated:Oct 16, 2017
Links: GitHub  ·  Packagist
Maintainer: angejia

pea

Join the chat at https://gitter.im/angejia/pea Build Status

Laravel Eloquent 的缓存层。

特色

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

更多细节参考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。


安个家出品。

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

655,942,320 9,702
laravel/framework

The Laravel Framework.

617,629,957 34,997
laravel/tinker

Powerful REPL for the Laravel framework.

524,145,802 7,444
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

442,489,569 607
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

412,228,818 4,664

Version History

Version Released Laravel License
v0.0.20 ^5.1 MIT
v0.0.19 ^5.1 MIT
v0.0.18 ^5.1 MIT
v0.0.17 ^5.1 MIT
v0.0.16 ^5.1 MIT