only encache new objects when insert was successful

This commit is contained in:
Evan Prodromou 2010-01-06 16:34:18 -10:00
parent 35d4587172
commit e50410683f

View File

@ -143,7 +143,9 @@ class Memcached_DataObject extends DB_DataObject
function insert()
{
$result = parent::insert();
$this->encache(); // in case of cached negative lookups
if ($result) {
$this->encache(); // in case of cached negative lookups
}
return $result;
}