mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-27 00:33:17 +00:00
Merge pull request #880 from pixelfed/frontend-ui-refactor
Update StatusTransformer
This commit is contained in:
commit
3627f90807
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