Laravel 的查询缓存
可记忆的 Laravel 5 查询缓存 =================================== 可记忆的是 Laravel 中的 Eloquent 特性,它添加了 remember() 查询方法。这样就可以非常方便地将查询结果缓存起来,并保留一段时间。
要开始使用 Eloquent,最简单的方法是创建一个抽象的 App\Model,您可以从中扩展应用程序模型。在该基础模型中,您可以导入可记住的特性,该特性将为您在模型上构建的任何查询扩展相同的缓存功能。
Alternatively, you can add the `$rememberCachePrefix` property to your model to always use that cache prefix.
### Cache driver
If you want to use a custom cache driver (defined in config/cache.php) you can add `cacheDriver('cacheDriver')` to your query.
php // 记住 th
暂无开放 Issues,或尚未同步最近议题。