diff options
Diffstat (limited to 'modules-available/statistics/page.inc.php')
-rw-r--r-- | modules-available/statistics/page.inc.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/modules-available/statistics/page.inc.php b/modules-available/statistics/page.inc.php index 09359342..877a90f2 100644 --- a/modules-available/statistics/page.inc.php +++ b/modules-available/statistics/page.inc.php @@ -1062,7 +1062,11 @@ class Page_Statistics extends Page public static function getPciId($cat, $id) { - return Database::queryFirst('SELECT value, dateline FROM pciid WHERE category = :cat AND id = :id LIMIT 1', + static $cache = []; + $key = $cat . '-' . $id; + if (isset($cache[$key])) + return $cache[$key]; + return $cache[$key] = Database::queryFirst('SELECT value, dateline FROM pciid WHERE category = :cat AND id = :id LIMIT 1', array('cat' => $cat, 'id' => $id)); } |