Make UserCache only look up a user once.
authorBrian Wolff <bawolff+wn@gmail.com>
Wed, 17 Apr 2013 21:23:11 +0000 (18:23 -0300)
committerBrian Wolff <bawolff+wn@gmail.com>
Wed, 17 Apr 2013 21:28:05 +0000 (18:28 -0300)
commitde1aefd55cd5cd7a950df72cce5f97d3dbff5ff6
tree95ae9dafa885e69d871ceb7f982289a61e08dfaa
parentdd6f294ad77a8d3fdcb61c3ba07b63b71adb113d
Make UserCache only look up a user once.

I noticed on special:listfiles/username, UserCache was doing queries
like select user_whatever from user where user_id in ( '1', '1', ...)
with the same user id 50 times (one for each result returned in the
special page). That seemed a little insane, so put the list of
users to query through a array_unique. (Quite likely the db would
optimize that query to not literally look up the same user 50 times,
but nonetheless it seems better to filter the list before then)

Change-Id: I80c8a359d0f7a53b2420ebcda641e594dd3c56e9
includes/cache/UserCache.php