increase todays pick cache time
This commit is contained in:
@@ -20,7 +20,7 @@ class TodaysPick extends Controller
|
|||||||
*/
|
*/
|
||||||
public function __invoke()
|
public function __invoke()
|
||||||
{
|
{
|
||||||
return Cache::remember('articles.todayspick', 600, function () {
|
return Cache::remember('articles.todayspick', 3600, function () { // Cache for an hour
|
||||||
return Article::with('topics', 'source')
|
return Article::with('topics', 'source')
|
||||||
->whereDate('published_date', Carbon::today())
|
->whereDate('published_date', Carbon::today())
|
||||||
->inRandomOrder()
|
->inRandomOrder()
|
||||||
|
@@ -17,7 +17,7 @@ class HomeController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function __invoke(Request $request)
|
public function __invoke(Request $request)
|
||||||
{
|
{
|
||||||
$todays_pick = Cache::remember('home.todayspick', 600, function () {
|
$todays_pick = Cache::remember('home.todayspick', 3600, function () { // Cache for an hour
|
||||||
return Article::with('topics', 'source')
|
return Article::with('topics', 'source')
|
||||||
->whereDate('published_date', Carbon::today())
|
->whereDate('published_date', Carbon::today())
|
||||||
->inRandomOrder()
|
->inRandomOrder()
|
||||||
|
Reference in New Issue
Block a user