]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/Profile_tag.php
Cache rollup stuff in the cache, not in the DB
[quix0rs-gnu-social.git] / classes / Profile_tag.php
index d7841bd8cace76188a8bd85f357043214ce813e9..00585280d3153146e885c6a10b9eae5ba8a0ad5a 100644 (file)
@@ -291,4 +291,26 @@ class Profile_tag extends Memcached_DataObject
         }
         return true;
     }
+
+    function insert()
+    {
+        $result = parent::insert();
+        if ($result) {
+            self::blow('profile_list:tagged_count:%d:%s', 
+                       $this->tagger,
+                       $this->tag);
+        }
+        return $result;
+    }
+
+    function delete()
+    {
+        $result = parent::delete();
+        if ($result) {
+            self::blow('profile_list:tagged_count:%d:%s', 
+                       $this->tagger,
+                       $this->tag);
+        }
+        return $result;
+    }
 }