We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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); }]);
It does however work with a simple eager loading:
$query->with(['feedback' => function ($query) { //Cache $cacheTime = 60; $query->remember($cacheTime); }]);
The text was updated successfully, but these errors were encountered:
When you say "didn't cache that part of the query" are you specifically referring to feedback?
feedback
The easiest solution is just to cache it separately and only requires one additional line:
$query->with([ 'feedback => function ($query) { $query->remember(60); } 'feedback.profile' => function ($query) { $query->remember(60); } ]);
Sorry, something went wrong.
No branches or pull requests
I tried to use the cache with nested eager loading, but didn't cache that part of the query:
It does however work with a simple eager loading:
The text was updated successfully, but these errors were encountered: