diff --git a/htdocs/lib/Comments.php b/htdocs/lib/Comments.php index e273fb8..07175a8 100644 --- a/htdocs/lib/Comments.php +++ b/htdocs/lib/Comments.php @@ -6,6 +6,7 @@ class Comments { $q = kl_str_sql("update signature set has_comments=(select count(*) as count from comment where signature_id=!i) where id=!i", $id, $id); DBH::$db->query($q); + Memc::flush(); } function addSignatureComment($id, $text) diff --git a/htdocs/lib/CrashStats.php b/htdocs/lib/CrashStats.php index 72426ac..a410bbe 100644 --- a/htdocs/lib/CrashStats.php +++ b/htdocs/lib/CrashStats.php @@ -27,7 +27,7 @@ class CrashStats $where = $this->filter->getWhere(); $q = "select count(r.id) as nr, s.id as signature_id, s.signature as signature_text, s.has_comments from reports r join signature s on r.signature_id = s.id $where group by signature_id order by nr desc"; $q .= kl_str_sql(" limit !i", 100); - // if (false !== $cached = Memc::getq($q)) return $cached; + if (false !== $cached = Memc::getq($q)) return $cached; if (!$res = DBH::$db->query($q)) { @@ -41,7 +41,7 @@ class CrashStats $ret[] = $r; } - // Memc::setq($q, $ret); + Memc::setq($q, $ret); return $ret; }