a little extra consistency in cache variable names

This commit is contained in:
Shish
2014-11-26 13:09:49 +00:00
parent 4721d666cd
commit c0dfd9adc0
4 changed files with 8 additions and 8 deletions

View File

@ -197,7 +197,7 @@ class PrivMsg extends Extension {
private function count_pms(User $user) {
global $database;
$count = $database->cache->get("pm-count-{$user->id}");
$count = $database->cache->get("pm-count:{$user->id}");
if(is_null($count) || $count === false) {
$count = $database->get_one("
SELECT count(*)
@ -205,7 +205,7 @@ class PrivMsg extends Extension {
WHERE to_id = :to_id
AND is_read = :is_read
", array("to_id" => $user->id, "is_read" => "N"));
$database->cache->set("pm-count-{$user->id}", $count, 600);
$database->cache->set("pm-count:{$user->id}", $count, 600);
}
return $count;
}