Update StatusService, reduce cache ttl from 7 days to 6 hours

pull/4554/head
Daniel Supernault 2 years ago
parent ecc697a241
commit 59b643789f
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7

@ -24,7 +24,7 @@ class StatusService
public static function get($id, $publicOnly = true) public static function get($id, $publicOnly = true)
{ {
return Cache::remember(self::key($id, $publicOnly), now()->addDays(7), function() use($id, $publicOnly) { return Cache::remember(self::key($id, $publicOnly), 21600, function() use($id, $publicOnly) {
if($publicOnly) { if($publicOnly) {
$status = Status::whereScope('public')->find($id); $status = Status::whereScope('public')->find($id);
} else { } else {

Loading…
Cancel
Save