# Let CDN cache things if we can purge them.
if ( $this->config->get( 'UseSquid' ) &&
in_array(
- // Use PROTO_INTERNAL because that's what getSquidURLs() uses
+ // Use PROTO_INTERNAL because that's what getCdnUrls() uses
wfExpandUrl( $request->getRequestURL(), PROTO_INTERNAL ),
- $requestTitle->getSquidURLs()
+ $requestTitle->getCdnUrls()
)
) {
$output->setCdnMaxage( $this->config->get( 'SquidMaxage' ) );
*
* @return string[] Array of String the URLs
*/
- public function getSquidURLs() {
+ public function getCdnUrls() {
$urls = array(
$this->getInternalURL(),
$this->getInternalURL( 'action=history' )
return $urls;
}
+ /**
+ * @deprecated since 1.27 use getCdnUrls()
+ */
+ public function getSquidURLs() {
+ return $this->getCdnUrls();
+ }
+
/**
* Purge all applicable CDN URLs
*/
public function purgeSquid() {
DeferredUpdates::addUpdate(
- new CdnCacheUpdate( $this->getSquidURLs() ),
+ new CdnCacheUpdate( $this->getCdnUrls() ),
DeferredUpdates::PRESEND
);
}
$smaxage = $config->get( 'SquidMaxage' );
} elseif ( $contentType == 'text/css' || $contentType == 'text/javascript' ) {
// CSS/JS raw content has its own CDN max age configuration.
- // Note: Title::getSquidURLs() includes action=raw for css/js pages,
+ // Note: Title::getCdnUrls() includes action=raw for css/js pages,
// so if using the canonical url, this will get HTCP purges.
$smaxage = intval( $config->get( 'ForcedRawSMaxage' ) );
} else {
public static function newFromTitles( $titles, $urlArr = array() ) {
/** @var Title $title */
foreach ( $titles as $title ) {
- $urlArr = array_merge( $urlArr, $title->getSquidURLs() );
+ $urlArr = array_merge( $urlArr, $title->getCdnUrls() );
}
return new CdnCacheUpdate( $urlArr );
* @deprecated 1.27
*/
public static function newSimplePurge( Title $title ) {
- return new CdnCacheUpdate( $title->getSquidURLs() );
+ return new CdnCacheUpdate( $title->getCdnUrls() );
}
/**
// Send purge after above page_touched update was committed
DeferredUpdates::addUpdate(
- new CdnCacheUpdate( $title->getSquidURLs() ),
+ new CdnCacheUpdate( $title->getCdnUrls() ),
DeferredUpdates::PRESEND
);