Merge pull request #961 from pixelfed/frontend-ui-refactor

Update StatusTransformer
This commit is contained in:
daniel 2019-03-05 12:44:03 -07:00 committed by GitHub
commit 332d57f6cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -62,7 +62,7 @@ class StatusTransformer extends Fractal\TransformerAbstract
public function includeMediaAttachments(Status $status) public function includeMediaAttachments(Status $status)
{ {
return Cache::remember('status:transformer:media:attachments:'.$status->id, now()->addMinutes(1440), function() use($status) { return Cache::remember('status:transformer:media:attachments:'.$status->id, now()->addMinutes(30), function() use($status) {
$media = $status->media()->orderBy('order')->get(); $media = $status->media()->orderBy('order')->get();
return $this->collection($media, new MediaTransformer()); return $this->collection($media, new MediaTransformer());
}); });