$wgMemc->set( $key, $val ? 1 : 0, 1800 );
}
if ( $changed ) {
- $this->invalidateCache( true );
+ $this->invalidateCache();
}
}
* Immediately touch the user data cache for this account.
* Updates user_touched field, and removes account data from memcached
* for reload on the next hit.
- *
- * @param $doDatabaseUpdate bool Do you really need to update the database? Really?
*/
- function invalidateCache( $doDatabaseUpdate = false ) {
+ function invalidateCache() {
if( wfReadOnly() ) {
return;
}
$this->load();
- if( $this->mId && $doDatabaseUpdate ) {
+ if( $this->mId ) {
$this->mTouched = self::newTouchedTimestamp();
$dbw = wfGetDB( DB_MASTER );
$this->mGroups[] = $group;
$this->mRights = User::getGroupPermissions( $this->getEffectiveGroups( true ) );
- $this->invalidateCache( true );
+ $this->invalidateCache();
}
/**
$this->mGroups = array_diff( $this->mGroups, array( $group ) );
$this->mRights = User::getGroupPermissions( $this->getEffectiveGroups( true ) );
- $this->invalidateCache( true );
+ $this->invalidateCache();
}
/**
$newGroups = array_unique( $newGroups );
// Ensure that caches are cleared
- $user->invalidateCache( true );
+ $user->invalidateCache();
wfDebug( 'oldGroups: ' . print_r( $oldGroups, true ) );
wfDebug( 'newGroups: ' . print_r( $newGroups, true ) );