Made User::loadFromId() skip cache with READ_LATEST
* That flag is used for anti-dependencies and thus should never rely on cache Bug: T95839 Change-Id: I4ffc8325e55588ef649b96e7b90bc95282f765a9
This commit is contained in:
parent
833cbddc99
commit
2c63d57ddd
1 changed files with 3 additions and 3 deletions
|
|
@ -385,10 +385,10 @@ class User implements IDBAccessObject {
|
|||
return false;
|
||||
}
|
||||
|
||||
// Try cache (unless this needs to lock the DB).
|
||||
// Try cache (unless this needs data from the master DB).
|
||||
// NOTE: if this thread called saveSettings(), the cache was cleared.
|
||||
$locking = ( ( $flags & self::READ_LOCKING ) == self::READ_LOCKING );
|
||||
if ( $locking || !$this->loadFromCache() ) {
|
||||
$latest = DBAccessObjectUtils::hasFlags( $flags, self::READ_LATEST );
|
||||
if ( $latest || !$this->loadFromCache() ) {
|
||||
wfDebug( "User: cache miss for user {$this->mId}\n" );
|
||||
// Load from DB (make sure this thread sees its own changes)
|
||||
if ( wfGetLB()->hasOrMadeRecentMasterChanges() ) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue