[ENTITY][Note] Caching note replies query
[COMPONENTS][Conversation] Reply route will now present a more suitable title
This commit is contained in:
parent
d7b46735ac
commit
ba078b7b76
@ -34,8 +34,6 @@ use App\Util\Formatting;
|
|||||||
use Component\Avatar\Avatar;
|
use Component\Avatar\Avatar;
|
||||||
use Component\Conversation\Entity\Conversation;
|
use Component\Conversation\Entity\Conversation;
|
||||||
use Component\Language\Entity\Language;
|
use Component\Language\Entity\Language;
|
||||||
use DateTimeInterface;
|
|
||||||
use function App\Core\I18n\_m;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Entity for notices
|
* Entity for notices
|
||||||
@ -354,7 +352,7 @@ class Note extends Entity
|
|||||||
*/
|
*/
|
||||||
public function getReplies(): array
|
public function getReplies(): array
|
||||||
{
|
{
|
||||||
return DB::findBy('note', ['reply_to' => $this->getId()], order_by: ['created' => 'DESC', 'id' => 'DESC']);
|
return Cache::getList('note-replies-' . $this->getId(), fn () => DB::findBy('note', ['reply_to' => $this->getId()], order_by: ['created' => 'DESC', 'id' => 'DESC']));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user