ported clock skew fudge from 1.4
This commit is contained in:
parent
a8bcf2cdb4
commit
1d12276bcb
2 changed files with 9 additions and 2 deletions
|
|
@ -786,6 +786,13 @@ $wgShowUpdatedMarker = true;
|
|||
|
||||
$wgCookieExpiration = 2592000;
|
||||
|
||||
/** Clock skew or the one-second resolution of time() can occasionally cause cache
|
||||
* problems when the user requests two pages within a short period of time. This
|
||||
* variable adds a given number of seconds to vulnerable timestamps, thereby giving
|
||||
* a grace period.
|
||||
*/
|
||||
$wgClockSkewFudge = 5;
|
||||
|
||||
# Squid-related settings
|
||||
#
|
||||
|
||||
|
|
|
|||
|
|
@ -687,8 +687,9 @@ class User {
|
|||
}
|
||||
|
||||
function invalidateCache() {
|
||||
global $wgClockSkewFudge;
|
||||
$this->loadFromDatabase();
|
||||
$this->mTouched = wfTimestampNow();
|
||||
$this->mTouched = wfTimestamp(TS_MW, time() + $wgClockSkewFudge );
|
||||
# Don't forget to save the options after this or
|
||||
# it won't take effect!
|
||||
}
|
||||
|
|
@ -1197,7 +1198,6 @@ class User {
|
|||
$wgMemc->delete( "$wgDBname:user:id:$this->mId" );
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Checks if a user with the given name exists, returns the ID
|
||||
*/
|
||||
|
|
|
|||
Loading…
Reference in a new issue