rememberable
rememberable copied to clipboard
Query caching for Laravel
Hello, We have a problem where Redis key created by this package is using alot of memory. It's named like this : **br-local:5f58eab33aae5665049267:standard_ref** and contains values like this:  Even...
Project.php ``` class Project extends Model { use Rememberable; public $rememberCacheTag = 'project_queries'; public $rememberFor = 60*60*24; public function users() { return $this->morphToMany(User::class, 'model','model_has_users'); } ``` User.php ``` class User...
If i query a realtion with withCount() the counting is never been refreshed, even after flushing the cache. The counting only works if I add dontRemember() to the query...
I tried to use the cache with nested eager loading, but didn't cache that part of the query: ``` $query->with(['feedback.profile' => function ($query) { //Cache $cacheTime = 60; $query->remember($cacheTime); }]);...
The setup is phpunit & array cache driver. And I've tapped in to the cache using: ``` php $cache = \Cache::store(); ``` The line below: ``` php $paginator = SomeModel::paginate($perPage)->load('relation');...