diff options
-rw-r--r-- | classes/Memcached_DataObject.php | 4 | ||||
-rw-r--r-- | plugins/UserFlag/User_flag_profile.php | 11 |
2 files changed, 14 insertions, 1 deletions
diff --git a/classes/Memcached_DataObject.php b/classes/Memcached_DataObject.php index 04f75b775..4e3cc5678 100644 --- a/classes/Memcached_DataObject.php +++ b/classes/Memcached_DataObject.php @@ -146,7 +146,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; } diff --git a/plugins/UserFlag/User_flag_profile.php b/plugins/UserFlag/User_flag_profile.php index 063ed04ea..bc4251cf7 100644 --- a/plugins/UserFlag/User_flag_profile.php +++ b/plugins/UserFlag/User_flag_profile.php @@ -90,6 +90,17 @@ class User_flag_profile extends Memcached_DataObject } /** + * return key definitions for DB_DataObject + * + * @return array key definitions + */ + + function keyTypes() + { + return $this->keys(); + } + + /** * Get a single object with multiple keys * * @param array $kv Map of key-value pairs |