Move code to load User data from cache out of loadFromId
authorMatthias Mullie <git@mullie.eu>
Mon, 9 Dec 2013 14:15:13 +0000 (15:15 +0100)
committerEBernhardson <ebernhardson@wikimedia.org>
Tue, 23 Sep 2014 19:38:50 +0000 (19:38 +0000)
commitd695ef0cd1c67d24c6ab998e12648c6449a7718e
tree361b2db297b459f3dffdc3b9c827742792236224
parent91d82fc4aa9a2c3c762a3e77e5f314f7523a7883
Move code to load User data from cache out of loadFromId

This way, outside code can load data from cache only if present. E.g. when data
for a lot of users is needed, it'd be preferable to batch-load all that is not
yet in cache.

Since there's currently no way to check for data in cache, one would have to
load all User objects separately (which may result in lots of DB queries if
nothing is in cache) or batch-load all of them (which may result in few DB
queries, but ones that may not be needed if all data is already in cache)

Change-Id: Ia22d04744760c3b6f3264786434e218b8aa88d53
includes/User.php