$this->mModules = array_merge( $this->mModules, (array)$modules );
}
- /**
- * @deprecated since 1.33 Use getModules() instead.
- * @return array
- */
- public function getModuleScripts() {
- wfDeprecated( __METHOD__, '1.33' );
- return [];
- }
-
/**
* Get the list of style-only modules to load on this page.
*
'user' => $this->getUser()->getTouched(),
'epoch' => $config->get( 'CacheEpoch' )
];
- if ( $config->get( 'UseSquid' ) ) {
+ if ( $config->get( 'UseCdn' ) ) {
$modifiedTimes['sepoch'] = wfTimestamp( TS_MW, $this->getCdnCacheEpoch(
time(),
- $config->get( 'SquidMaxage' )
+ $config->get( 'CdnMaxAge' )
) );
}
Hooks::run( 'OutputPageCheckLastModified', [ &$modifiedTimes, $this ] );
* @return int Timestamp
*/
private function getCdnCacheEpoch( $reqTime, $maxAge ) {
- // Ensure Last-Modified is never more than (wgSquidMaxage) in the past,
+ // Ensure Last-Modified is never more than $wgCdnMaxAge in the past,
// because even if the wiki page content hasn't changed since, static
// resources may have changed (skin HTML, interface messages, urls, etc.)
// and must roll-over in a timely manner (T46570)
$helpUrl = $to;
} else {
$toUrlencoded = wfUrlencode( str_replace( ' ', '_', $to ) );
- $helpUrl = "//www.mediawiki.org/wiki/Special:MyLanguage/$toUrlencoded";
+ $helpUrl = "https://www.mediawiki.org/wiki/Special:MyLanguage/$toUrlencoded";
}
$link = Html::rawElement(
*
* @param string|int|float|bool|null $mtime Last-Modified timestamp
* @param int $minTTL Minimum TTL in seconds [default: 1 minute]
- * @param int $maxTTL Maximum TTL in seconds [default: $wgSquidMaxage]
+ * @param int $maxTTL Maximum TTL in seconds [default: $wgCdnMaxAge]
* @since 1.28
*/
public function adaptCdnTTL( $mtime, $minTTL = 0, $maxTTL = 0 ) {
$minTTL = $minTTL ?: IExpiringStore::TTL_MINUTE;
- $maxTTL = $maxTTL ?: $this->getConfig()->get( 'SquidMaxage' );
+ $maxTTL = $maxTTL ?: $this->getConfig()->get( 'CdnMaxAge' );
if ( $mtime === null || $mtime === false ) {
return $minTTL; // entity does not exist
if ( $this->mEnableClientCache ) {
if (
- $config->get( 'UseSquid' ) &&
+ $config->get( 'UseCdn' ) &&
!$response->hasCookies() &&
!SessionManager::getGlobalSession()->isPersistent() &&
!$this->isPrintable() &&
# start with a shorter timeout for initial testing
# header( 'Surrogate-Control: max-age=2678400+2678400, content="ESI/1.0"');
$response->header(
- "Surrogate-Control: max-age={$config->get( 'SquidMaxage' )}" .
+ "Surrogate-Control: max-age={$config->get( 'CdnMaxAge' )}" .
"+{$this->mCdnMaxage}, content=\"ESI/1.0\""
);
$response->header( 'Cache-Control: s-maxage=0, must-revalidate, max-age=0' );