$wgCookieSecure = ($wgProto == 'https');
$wgDisableCookieCheck = false;
+/** A list of cookies that vary the cache (for use by extensions) */
+$wgCacheVaryCookies = array();
+
/** Override to customise the session name */
$wgSessionName = false;
}
function getCacheVaryCookies() {
- global $wgCookiePrefix;
- return array(
- "{$wgCookiePrefix}Token",
- "{$wgCookiePrefix}LoggedOut",
- session_name() );
+ global $wgCookiePrefix, $wgCacheVaryCookies;
+ static $cookies;
+ if ( $cookies === null ) {
+ $cookies = array_merge(
+ array(
+ "{$wgCookiePrefix}Token",
+ "{$wgCookiePrefix}LoggedOut",
+ session_name()
+ ),
+ $wgCacheVaryCookies
+ );
+ wfRunHooks('GetCacheVaryCookies', array( $this, &$cookies ) );
+ }
+ return $cookies;
}
function uncacheableBecauseRequestVars() {