mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-12-24 16:53:17 +00:00
Update StatusTransformer
This commit is contained in:
parent
19617f286c
commit
eb7651e8ef
1 changed files with 4 additions and 3 deletions
|
@ -62,9 +62,10 @@ class StatusTransformer extends Fractal\TransformerAbstract
|
|||
|
||||
public function includeMediaAttachments(Status $status)
|
||||
{
|
||||
$media = $status->media()->orderBy('order')->get();
|
||||
|
||||
return $this->collection($media, new MediaTransformer());
|
||||
return Cache::remember('status:transformer:media:attachments:'.$status->id, 1440, function() use($status) {
|
||||
$media = $status->media()->orderBy('order')->get();
|
||||
return $this->collection($media, new MediaTransformer());
|
||||
});
|
||||
}
|
||||
|
||||
public function includeTags(Status $status)
|
||||
|
|
Loading…
Reference in a new issue