From: Evan Prodromou Date: Mon, 22 Aug 2011 15:25:13 +0000 (-0400) Subject: Merge remote-tracking branch 'gitorious/1.0.x' into 1.0.x X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=0a17e7cf9f4983cf3e96b65c548c39dff0d80b72;p=quix0rs-gnu-social.git Merge remote-tracking branch 'gitorious/1.0.x' into 1.0.x Conflicts: classes/Memcached_DataObject.php --- 0a17e7cf9f4983cf3e96b65c548c39dff0d80b72 diff --cc classes/Memcached_DataObject.php index e515e3d9e0,9cedcc6ff6..b857ae64b9 --- a/classes/Memcached_DataObject.php +++ b/classes/Memcached_DataObject.php @@@ -313,40 -185,36 +313,40 @@@ class Memcached_DataObject extends Safe $copy = clone($i); $copy->encache(); $result[$i->$keyCol][] = $copy; + $pkeyVal = array(); + foreach ($pkeyCols as $pkeyCol) { + $pkeyVal[] = $i->$pkeyCol; + } + $pkeyMap[$i->$keyCol][] = $pkeyVal; } - } - foreach ($toFetch as $keyVal) - { - self::cacheSet(sprintf("%s:list:%s:%s", $cls, $keyCol, $keyVal), - $result[$keyVal]); - } + } + foreach ($toFetch as $keyVal) { + self::cacheSet(sprintf("%s:list-ids:%s:%s", $cls, $keyCol, $keyVal), + $pkeyMap[$keyVal]); + } } - return $result; - } - - function columnType($columnName) - { - $keys = $this->table(); - if (!array_key_exists($columnName, $keys)) { - throw new Exception('Unknown key column ' . $columnName . ' in ' . join(',', array_keys($keys))); - } - - $def = $keys[$columnName]; - - if ($def & DB_DATAOBJECT_INT) { - return 'integer'; - } else { - return 'string'; - } + return $result; } + function columnType($columnName) + { + $keys = $this->table(); + if (!array_key_exists($columnName, $keys)) { + throw new Exception('Unknown key column ' . $columnName . ' in ' . join(',', array_keys($keys))); + } + + $def = $keys[$columnName]; + + if ($def & DB_DATAOBJECT_INT) { + return 'integer'; + } else { + return 'string'; + } + } + /** - * @fixme Should this return false on lookup fail to match staticGet? + * @todo FIXME: Should this return false on lookup fail to match staticGet? */ function pkeyGet($cls, $kv) {