]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
add cleanup method to cleanup a single row
authorEvan Prodromou <evan@status.net>
Fri, 1 Jan 2010 21:02:56 +0000 (11:02 -1000)
committerEvan Prodromou <evan@status.net>
Fri, 1 Jan 2010 21:02:56 +0000 (11:02 -1000)
classes/Memcached_DataObject.php

index f511335083e987da245fc4243236a845131436ec..cf7fb4340ab9f301e2f516b3440bd5f69ac1d7e5 100644 (file)
@@ -253,6 +253,18 @@ class Memcached_DataObject extends DB_DataObject
         return new ArrayWrapper($cached);
     }
 
+    function cleanup()
+    {
+        global $_DB_DATAOBJECT;
+
+        if (isset($_DB_DATAOBJECT['RESULTFIELDS'][$this->_DB_resultid])) {
+            unset($_DB_DATAOBJECT['RESULTFIELDS'][$this->_DB_resultid]);
+        }
+        if (isset($_DB_DATAOBJECT['RESULTS'][$this->_DB_resultid])) {
+            unset($_DB_DATAOBJECT['RESULTS'][$this->_DB_resultid]);
+        }
+    }
+
     // We overload so that 'SET NAMES "utf8"' is called for
     // each connection