Re-enable caching of the stats page

This commit is contained in:
Latif Khalifa
2013-10-15 02:40:58 +02:00
parent 5900c7ab45
commit 085706321a
2 changed files with 3 additions and 2 deletions

View File

@@ -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)

View File

@@ -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;
}