Skip to content

angejia/pea

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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属性$needCachetrue即可开启缓存支持。

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

如果你有专门的 Redis 缓存实例,可以通过config/database.php指定。具体参见wiki


安个家出品。

About

Laravel Eloquent Database Cache Layer

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages