1
0
Fork 1
mirror of https://github.com/pixelfed/pixelfed.git synced 2024-12-24 16:53:17 +00:00

Update StatusTransformer

This commit is contained in:
Daniel Supernault 2019-06-10 20:12:46 -06:00
parent 734e89259b
commit f35718bf66
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

@ -67,7 +67,7 @@ class StatusTransformer extends Fractal\TransformerAbstract
public function includeMediaAttachments(Status $status)
{
return Cache::remember('status:transformer:media:attachments:'.$status->id, now()->addMinutes(3), function() use($status) {
return Cache::remember('status:transformer:media:attachments:'.$status->id, now()->addDays(14), function() use($status) {
if(in_array($status->type, ['photo', 'video', 'photo:album', 'loop'])) {
$media = $status->media()->orderBy('order')->get();
return $this->collection($media, new MediaTransformer());