Answer the question
In order to leave comments, you need to log in
How to cache (cache queries to the database) a site on Laravel?
Hello.
There is a site on Laravel 5.
On the main page, 100-200 records are displayed, in total there are 9 queries to the database on the main page, but they work a little for a long time.
Threw a query to the database in the cache:
Cache::remember('data', 60, function(){
return DB::table('articles');
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question