]> git.mxchange.org Git - quix0rs-gnu-social.git/blobdiff - classes/Profile_list.php
better output for registration confirmation
[quix0rs-gnu-social.git] / classes / Profile_list.php
index cf0a255e75c8c0e2a930a83eda5e87df3b5444ee..17c2ffd4f470c78dcadddb9327d43f0f6ad642c7 100644 (file)
@@ -326,6 +326,8 @@ class Profile_list extends Memcached_DataObject
         Profile_tag::cleanup($this);
         Profile_tag_subscription::cleanup($this);
 
+        self::blow('profile:lists:%d', $this->tagger);
+
         return parent::delete();
     }
 
@@ -470,6 +472,23 @@ class Profile_list extends Memcached_DataObject
         return $count;
     }
 
+    /**
+     * get the cached number of profiles subscribed to this
+     * people tag, re-count if the argument is true.
+     *
+     * @param boolean $recount  whether to ignore cache
+     *
+     * @return integer count
+     */
+
+    function blowNoticeStreamCache($all=false)
+    {
+        self::blow('profile_list:notice_ids:%d', $this->id);
+        if ($all) {
+            self::blow('profile_list:notice_ids:%d;last', $this->id);
+        }
+    }
+
     /**
      * get the Profile_list object by the
      * given tagger and with given tag
@@ -893,4 +912,13 @@ class Profile_list extends Memcached_DataObject
             return new ArrayWrapper($wrapped);
         }
     }
+
+    function insert()
+    {
+        $result = parent::insert();
+        if ($result) {
+            self::blow('profile:lists:%d', $this->tagger);
+        }
+        return $result;
+    }
 }