summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvan Prodromou <evan@status.net>2010-01-01 10:57:22 -1000
committerEvan Prodromou <evan@status.net>2010-01-01 10:57:22 -1000
commit727978332ae7e074024ac7f9900570ebb0e9ba80 (patch)
treeab4c42c3536dd6b248fa2ccd3a231fe99b9efc47
parent360fdb219dde7cb46b919aa18826df8ce5f4fdc6 (diff)
stop using DB_DataObject's staticGet() which caches
-rw-r--r--classes/Memcached_DataObject.php12
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;
}
}