From e50410683fa29dd424f893dd302d835828e0711f Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Wed, 6 Jan 2010 16:34:18 -1000 Subject: [PATCH] only encache new objects when insert was successful --- classes/Memcached_DataObject.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/classes/Memcached_DataObject.php b/classes/Memcached_DataObject.php index d11bd63682..15ca348218 100644 --- a/classes/Memcached_DataObject.php +++ b/classes/Memcached_DataObject.php @@ -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; } -- 2.39.5