mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-26 16:23:16 +00:00
Update DiscoverController
This commit is contained in:
parent
8bd3876e5b
commit
29fa8ffec5
1 changed files with 1 additions and 1 deletions
|
@ -37,7 +37,7 @@ class DiscoverController extends Controller
|
||||||
|
|
||||||
$page = $request->input('page') ?? 1;
|
$page = $request->input('page') ?? 1;
|
||||||
$key = 'discover:tag-'.$tag->id.':page-'.$page;
|
$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) {
|
$posts = Cache::remember($key, now()->addMinutes($keyMinutes), function() use ($tag, $request) {
|
||||||
return $tag->posts()
|
return $tag->posts()
|
||||||
|
|
Loading…
Reference in a new issue