]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
only encache new objects when insert was successful
authorEvan Prodromou <evan@status.net>
Thu, 7 Jan 2010 02:34:18 +0000 (16:34 -1000)
committerEvan Prodromou <evan@status.net>
Thu, 7 Jan 2010 02:34:18 +0000 (16:34 -1000)
classes/Memcached_DataObject.php

index d11bd636823a18c8c4b598353ba57cc0316df890..15ca3482183e45d5667a70ad1cdba5ae27eda38b 100644 (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;
     }