increase todays pick cache time

This commit is contained in:
2021-06-28 11:18:48 +05:00
parent c592a2cb62
commit b3f15c81b4
2 changed files with 2 additions and 2 deletions

View File

@@ -20,7 +20,7 @@ class TodaysPick extends Controller
*/
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')
->whereDate('published_date', Carbon::today())
->inRandomOrder()

View File

@@ -17,7 +17,7 @@ class HomeController extends Controller
*/
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')
->whereDate('published_date', Carbon::today())
->inRandomOrder()