From: Evan Prodromou Date: Fri, 1 Jan 2010 21:02:56 +0000 (-1000) Subject: add cleanup method to cleanup a single row X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=b0527801d9c2b84408bbfdf82bbdc5b778f72cfc;p=quix0rs-gnu-social.git add cleanup method to cleanup a single row --- diff --git a/classes/Memcached_DataObject.php b/classes/Memcached_DataObject.php index f511335083..cf7fb4340a 100644 --- a/classes/Memcached_DataObject.php +++ b/classes/Memcached_DataObject.php @@ -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