diff --git a/lib/Library.php b/lib/Library.php index 2902b24f..235a03f2 100644 --- a/lib/Library.php +++ b/lib/Library.php @@ -159,12 +159,16 @@ class Library{ /** * @return array - * @throws Exceptions\AppException */ public static function GetEbooksByCollection(string $collection): array{ - // Do we have the tag's ebooks cached? - /** @var array */ - return self::GetFromApcu('collection-' . $collection); + $ebooks = Db::Query(' + SELECT e.* + from Ebooks e inner join Collections c using (EbookId) + where c.UrlName = ? + order by c.SequenceNumber, e.Title + ', [$collection], Ebook::class); + + return $ebooks; } /**