function insert() {
$result = parent::insert();
- if ($result) {
- $this->encache();
- }
return $result;
}
function update($orig=NULL) {
- if (!is_null($orig)) {
+ if (is_object($orig) && $orig instanceof Memcached_DataObject) {
$orig->decache(); # might be different keys
}
$result = parent::update($orig);