blow cache when new notice in conversation is saved

This commit is contained in:
Evan Prodromou 2009-06-25 02:11:34 -07:00
parent 246013d984
commit 79547d99cf

View File

@ -339,6 +339,19 @@ class Notice extends Memcached_DataObject
$this->blowPublicCache($blowLast); $this->blowPublicCache($blowLast);
$this->blowTagCache($blowLast); $this->blowTagCache($blowLast);
$this->blowGroupCache($blowLast); $this->blowGroupCache($blowLast);
$this->blowConversationCache($blowLast);
}
function blowConversationCache($blowLast=false)
{
$cache = common_memcache();
if ($cache) {
$ck = 'notice:conversation:'.$this->conversation;
$cache->delete($ck);
if ($blowLast) {
$cache->delete($ck.';last');
}
}
} }
function blowGroupCache($blowLast=false) function blowGroupCache($blowLast=false)