kopia lustrzana https://github.com/pixelfed/pixelfed
Update StatusService, reduce cache ttl from 7 days to 6 hours
rodzic
ecc697a241
commit
59b643789f
|
@ -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 {
|
||||||
|
|
Ładowanie…
Reference in New Issue