From e396f34ea53be1dd85a74d167b9a628612ca64ea Mon Sep 17 00:00:00 2001 From: Sieger66 Date: Sat, 23 Nov 2024 19:21:23 +0100 Subject: [PATCH] Update Helper.php --- plugins/system/helixultimate/src/Platform/Helper.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/system/helixultimate/src/Platform/Helper.php b/plugins/system/helixultimate/src/Platform/Helper.php index 866deffb..85188b84 100644 --- a/plugins/system/helixultimate/src/Platform/Helper.php +++ b/plugins/system/helixultimate/src/Platform/Helper.php @@ -40,6 +40,10 @@ class Helper */ public static function getTemplateStyle($id = 0) { + static $cache = []; + if (isset($cache[$id])) { + return $cache[$id]; + } $db = Factory::getDbo(); $query = $db->getQuery(true); @@ -51,7 +55,9 @@ public static function getTemplateStyle($id = 0) $db->setQuery($query); - return $db->loadObject(); + $cache[$id] = $db->loadObject(); + + return $cache[$id]; } /**