Update StatusTransformer

This commit is contained in:
Daniel Supernault 2020-01-06 23:24:47 -07:00
parent d27e60c3e8
commit 8b7917e76a
No known key found for this signature in database
GPG key ID: 0DEF1C662C9033F7

View file

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