diff options
author | Evan Prodromou <evan@status.net> | 2010-01-01 10:57:22 -1000 |
---|---|---|
committer | Evan Prodromou <evan@status.net> | 2010-01-01 10:57:22 -1000 |
commit | 727978332ae7e074024ac7f9900570ebb0e9ba80 (patch) | |
tree | ab4c42c3536dd6b248fa2ccd3a231fe99b9efc47 /classes/Memcached_DataObject.php | |
parent | 360fdb219dde7cb46b919aa18826df8ce5f4fdc6 (diff) |
stop using DB_DataObject's staticGet() which caches
Diffstat (limited to 'classes/Memcached_DataObject.php')
-rw-r--r-- | classes/Memcached_DataObject.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/classes/Memcached_DataObject.php b/classes/Memcached_DataObject.php index d8b0db5a6..f51133508 100644 --- a/classes/Memcached_DataObject.php +++ b/classes/Memcached_DataObject.php @@ -51,11 +51,17 @@ class Memcached_DataObject extends DB_DataObject if ($i) { return $i; } else { - $i = DB_DataObject::staticGet($cls, $k, $v); - if ($i) { + $i = DB_DataObject::factory($cls); + if (empty($i)) { + return null; + } + $result = $i->get($k, $v); + if ($result) { $i->encache(); + return $i; + } else { + return null; } - return $i; } } |