]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
blow cache when new notice in conversation is saved
authorEvan Prodromou <evan@controlyourself.ca>
Thu, 25 Jun 2009 09:11:34 +0000 (02:11 -0700)
committerEvan Prodromou <evan@controlyourself.ca>
Thu, 25 Jun 2009 09:11:34 +0000 (02:11 -0700)
classes/Notice.php

index 6f9b73be4b699bddbd50bcd9528b7983b43b0f4d..8689dd427a459a4ede94b25a7bb8830464e6bc15 100644 (file)
@@ -339,6 +339,19 @@ class Notice extends Memcached_DataObject
         $this->blowPublicCache($blowLast);
         $this->blowTagCache($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)