https://blog.kovah.de/en/d83b6-laravel-query-caching-rememberable/ Reduce the query count with query caching in Laravel. Kevin Woblick

Laravel query caching with Rememberable

Laravel caching is really awesome and works perfectly. By adding the watson/rememberable package I was able to reduce the overall query count from 33 to zero. Zero!

// Get a the first user's posts and remember them for a day.
User::first()->remember(1440)->posts()->get();

This Blog happily accepts Webmentions

0 Mentions
0 Reposts
Likes