summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-01-01 11:02:56 -1000
committerEvan Prodromou <evan@status.net>2010-01-01 11:02:56 -1000
commitb0527801d9c2b84408bbfdf82bbdc5b778f72cfc (patch)
tree721005c5f17b8b9f22b1a25ce26f44321b0a9050 /classes
parent727978332ae7e074024ac7f9900570ebb0e9ba80 (diff)
add cleanup method to cleanup a single row
Diffstat (limited to 'classes')
-rw-r--r--classes/Memcached_DataObject.php12
1 files changed, 12 insertions, 0 deletions
diff --git a/classes/Memcached_DataObject.php b/classes/Memcached_DataObject.php
index f51133508..cf7fb4340 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