unifreak / rememberable-db
Query caching for Laravel 5 DB
v1.0.1
2018-09-25 09:14 UTC
Requires
- watson/rememberable: ^2.0
This package is auto-updated.
Last update: 2025-03-25 23:38:15 UTC
README
RememberableDB
extends from https://github.com/dwightwatson/rememberable, added caching ability to DB
(using facade RDB
).
Install
-
install composer package: run
composer require unifreak/rememberable-db
-
register service provider: open
config/app.php
, add the following line intoproviders
config entry:UniFreak\RememberableDB\RDBServiceProvider::class,
-
register facade: open
config/app.php
, add the following line intoaliases
config entry:'RDB' => UniFreak\RememberableDB\RDBFacade::class,
-
done
usage
// first, import RDB facade use RDB // you need to call table() first, then you can use the caching functions // see <https://github.com/dwightwatson/rememberable> RDB::table()->remember()....