Update Cache, prepare for laravel 5.8

This commit is contained in:
Daniel Supernault 2019-02-25 11:56:24 -07:00
parent 6bbef6ac4e
commit 4739c25fe0
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7
15 changed files with 31 additions and 30 deletions

View file

@ -223,7 +223,7 @@ class PublicApiController extends Controller
// $timeline = Timeline::build()->local();
$pid = Auth::user()->profile->id;
$private = Cache::remember('profiles:private', 1440, function() {
$private = Cache::remember('profiles:private', now()->addMinutes(1440), function() {
return Profile::whereIsPrivate(true)
->orWhere('unlisted', true)
->orWhere('status', '!=', null)
@ -317,7 +317,7 @@ class PublicApiController extends Controller
// $timeline = Timeline::build()->local();
$pid = Auth::user()->profile->id;
$following = Cache::remember('profile:following:'.$pid, 1440, function() use($pid) {
$following = Cache::remember('profile:following:'.$pid, now()->addMinutes(1440), function() use($pid) {
$following = Follower::whereProfileId($pid)->pluck('following_id');
return $following->push($pid)->toArray();
});