Update DiscoverController

This commit is contained in:
Daniel Supernault 2019-03-02 12:29:29 -07:00
parent 8bd3876e5b
commit 29fa8ffec5
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7
1 changed files with 1 additions and 1 deletions

View File

@ -37,7 +37,7 @@ class DiscoverController extends Controller
$page = $request->input('page') ?? 1;
$key = 'discover:tag-'.$tag->id.':page-'.$page;
$keyMinutes = $page > 1 ? 5 : 2;
$keyMinutes = $page == 1 ? 15 : 5;
$posts = Cache::remember($key, now()->addMinutes($keyMinutes), function() use ($tag, $request) {
return $tag->posts()