8000 GitHub - angejia/pea: Laravel Eloquent Database Cache Layer · GitHub
[go: up one dir, main page]

Skip to content
angejiaPublic

About

Laravel Eloquent Database Cache Layer

Resources

Stars

82 stars

Watchers

9 watching

Forks

Latest commit

 

History

56 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

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

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


安个家出品。

About

Laravel Eloquent Database Cache Layer

Resources

Stars

82 stars

Watchers

9 watching

Forks

Releases

Packages

Used by

Contributors

Languages

0