Skip to content

Commit

Permalink
Cache TTL In Seconds for 5.8
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumebriday committed Mar 4, 2019
1 parent 6ee8682 commit f051620
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/Http/Controllers/PostFeedController.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class PostFeedController extends Controller
*/
public function index(): Response
{
$posts = Cache::remember('feed-posts', 60, function () {
$posts = Cache::remember('feed-posts', now()->addHour(), function () {
return Post::latest()->limit(20)->get();
});

Expand Down

0 comments on commit f051620

Please sign in to comment.