From 6af3c39c0766bcf32a9a77768345074b96c1f122 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Wed, 9 Dec 2015 17:30:47 -0800 Subject: [PATCH] Replace "squid" with "CDN" in various comments Change-Id: Idcc528daf28e119349155d36e30a9bcf61b2e7d5 --- includes/AjaxResponse.php | 6 +++--- includes/DefaultSettings.php | 8 ++++---- includes/EditPage.php | 2 +- includes/GlobalFunctions.php | 2 +- includes/MediaWiki.php | 2 +- includes/OutputHandler.php | 2 +- includes/OutputPage.php | 6 +++--- includes/Setup.php | 2 +- includes/Title.php | 8 ++++---- includes/actions/RawAction.php | 4 ++-- includes/deferred/CdnCacheUpdate.php | 7 +++---- includes/filerepo/file/LocalFile.php | 18 +++++++++--------- includes/jobqueue/README | 4 ++-- includes/jobqueue/jobs/HTMLCacheUpdateJob.php | 2 +- includes/page/WikiPage.php | 2 +- includes/skins/Skin.php | 2 +- includes/specials/SpecialRevisiondelete.php | 4 ++-- includes/specials/SpecialUndelete.php | 4 ++-- includes/utils/IP.php | 2 +- 19 files changed, 43 insertions(+), 44 deletions(-) diff --git a/includes/AjaxResponse.php b/includes/AjaxResponse.php index 34bb65f19b..db989a4932 100644 --- a/includes/AjaxResponse.php +++ b/includes/AjaxResponse.php @@ -175,14 +175,14 @@ class AjaxResponse { } if ( $this->mCacheDuration ) { - # If squid caches are configured, tell them to cache the response, - # and tell the client to always check with the squid. Otherwise, + # If CDN caches are configured, tell them to cache the response, + # and tell the client to always check with the CDN. Otherwise, # tell the client to use a cached copy, without a way to purge it. if ( $this->mConfig->get( 'UseSquid' ) ) { # Expect explicit purge of the proxy cache, but require end user agents # to revalidate against the proxy on each visit. - # Surrogate-Control controls our Squid, Cache-Control downstream caches + # Surrogate-Control controls our CDN, Cache-Control downstream caches if ( $this->mConfig->get( 'UseESI' ) ) { header( 'Surrogate-Control: max-age=' . $this->mCacheDuration . ', content="ESI/1.0"' ); diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index de364a67e0..236a3f9bdb 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -2534,7 +2534,7 @@ $wgExtensionInfoMTime = false; /** @} */ # end of cache settings /************************************************************************//** - * @name HTTP proxy (Squid) settings + * @name HTTP proxy (CDN) settings * * Many of these settings apply to any HTTP proxy used in front of MediaWiki, * although they are referred to as Squid settings for historical reasons. @@ -2547,7 +2547,7 @@ $wgExtensionInfoMTime = false; */ /** - * Enable/disable Squid. + * Enable/disable CDN. * See https://www.mediawiki.org/wiki/Manual:Squid_caching */ $wgUseSquid = false; @@ -2575,7 +2575,7 @@ $wgUseKeyHeader = false; $wgVaryOnXFP = false; /** - * Internal server name as known to Squid, if different. + * Internal server name as known to CDN, if different. * * @par Example: * @code @@ -2587,7 +2587,7 @@ $wgInternalServer = false; /** * Cache TTL for the CDN sent as s-maxage (without ESI) or * Surrogate-Control (with ESI). Without ESI, you should strip - * out s-maxage in the Squid config. + * out s-maxage in the CDN config. * * 18000 seconds = 5 hours, more cache hits with 2678400 = 31 days. */ diff --git a/includes/EditPage.php b/includes/EditPage.php index c709d00e18..47912cb8c2 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1849,7 +1849,7 @@ class EditPage { $this->page->getComment() == $this->newSectionSummary() ) { // Probably a duplicate submission of a new comment. - // This can happen when squid resends a request after + // This can happen when CDN resends a request after // a timeout but the first one actually went through. wfDebug( __METHOD__ . ": duplicate new section submission; trigger edit conflict!\n" ); diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 4c85bd6d26..603d259dae 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -4109,7 +4109,7 @@ function wfGetIP() { /** * Checks if an IP is a trusted proxy provider. * Useful to tell if X-Forwarded-For data is possibly bogus. - * Squid cache servers for the site are whitelisted. + * CDN cache servers for the site are whitelisted. * @deprecated Since 1.24, use IP::isTrustedProxy() * * @param string $ip diff --git a/includes/MediaWiki.php b/includes/MediaWiki.php index 50f2dadf8d..409d9e063e 100644 --- a/includes/MediaWiki.php +++ b/includes/MediaWiki.php @@ -443,7 +443,7 @@ class MediaWiki { $action = Action::factory( $act, $page, $this->context ); if ( $action instanceof Action ) { - # Let Squid cache things if we can purge them. + # 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 diff --git a/includes/OutputHandler.php b/includes/OutputHandler.php index 39716ca0b4..30f193cdd8 100644 --- a/includes/OutputHandler.php +++ b/includes/OutputHandler.php @@ -162,7 +162,7 @@ function wfMangleFlashPolicy( $s ) { } /** - * Add a Content-Length header if possible. This makes it cooperate with squid better. + * Add a Content-Length header if possible. This makes it cooperate with CDN better. * * @param int $length */ diff --git a/includes/OutputPage.php b/includes/OutputPage.php index b7f5558b50..ea85358c6b 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -2194,7 +2194,7 @@ class OutputPage extends ContextSource { if ( $config->get( 'UseESI' ) ) { # We'll purge the proxy cache explicitly, but require end user agents # to revalidate against the proxy on each visit. - # Surrogate-Control controls our Squid, Cache-Control downstream caches + # Surrogate-Control controls our CDN, Cache-Control downstream caches wfDebug( __METHOD__ . ": proxy caching with ESI; {$this->mLastModified} **\n", 'log' ); # start with a shorter timeout for initial testing # header( 'Surrogate-Control: max-age=2678400+2678400, content="ESI/1.0"'); @@ -2204,7 +2204,7 @@ class OutputPage extends ContextSource { } else { # We'll purge the proxy cache for anons explicitly, but require end user agents # to revalidate against the proxy on each visit. - # IMPORTANT! The Squid needs to replace the Cache-Control header with + # IMPORTANT! The CDN needs to replace the Cache-Control header with # Cache-Control: s-maxage=0, must-revalidate, max-age=0 wfDebug( __METHOD__ . ": local proxy caching; {$this->mLastModified} **\n", 'log' ); # start with a shorter timeout for initial testing @@ -2911,7 +2911,7 @@ class OutputPage extends ContextSource { // on-wiki like user pages, or user preferences; we need to find the highest // timestamp of these user-changeable modules so we can ensure cache misses on change // This should NOT be done for the site group (bug 27564) because anons get that too - // and we shouldn't be putting timestamps in Squid-cached HTML + // and we shouldn't be putting timestamps in CDN-cached HTML $version = null; if ( $group === 'user' ) { $query['version'] = $resourceLoader->getCombinedVersion( $context, array_keys( $grpModules ) ); diff --git a/includes/Setup.php b/includes/Setup.php index a94bd12b6a..e22184fc88 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -422,7 +422,7 @@ if ( is_array( $wgExtraNamespaces ) ) { $wgContLanguageCode = $wgLanguageCode; // Easy to forget to falsify $wgDebugToolbar for static caches. -// If file cache or squid cache is on, just disable this (DWIMD). +// If file cache or CDN cache is on, just disable this (DWIMD). if ( $wgUseFileCache || $wgUseSquid ) { $wgDebugToolbar = false; } diff --git a/includes/Title.php b/includes/Title.php index 440204b5ab..e2c2143c4a 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -1824,7 +1824,7 @@ class Title { /** * Get the URL form for an internal link. - * - Used in various Squid-related code, in case we have a different + * - Used in various CDN-related code, in case we have a different * internal hostname for the server from the exposed one. * * This uses $wgInternalServer to qualify the path, or $wgServer @@ -3557,7 +3557,7 @@ class Title { } /** - * Get a list of URLs to purge from the Squid cache when this + * Get a list of URLs to purge from the CDN cache when this * page changes * * @return string[] Array of String the URLs @@ -3588,7 +3588,7 @@ class Title { } /** - * Purge all applicable Squid URLs + * Purge all applicable CDN URLs */ public function purgeSquid() { DeferredUpdates::addUpdate( @@ -4415,7 +4415,7 @@ class Title { } /** - * Update page_touched timestamps and send squid purge messages for + * Update page_touched timestamps and send CDN purge messages for * pages linking to this title. May be sent to the job queue depending * on the number of links. Typically called on create and delete. */ diff --git a/includes/actions/RawAction.php b/includes/actions/RawAction.php index b71b0e9eda..78197ab699 100644 --- a/includes/actions/RawAction.php +++ b/includes/actions/RawAction.php @@ -80,12 +80,12 @@ class RawAction extends FormlessAction { if ( $this->gen ) { $smaxage = $config->get( 'SquidMaxage' ); } elseif ( $contentType == 'text/css' || $contentType == 'text/javascript' ) { - // CSS/JS raw content has its own squid max age configuration. + // CSS/JS raw content has its own CDN max age configuration. // Note: Title::getSquidURLs() includes action=raw for css/js pages, // so if using the canonical url, this will get HTCP purges. $smaxage = intval( $config->get( 'ForcedRawSMaxage' ) ); } else { - // No squid cache for anything else + // No CDN cache for anything else $smaxage = 0; } } diff --git a/includes/deferred/CdnCacheUpdate.php b/includes/deferred/CdnCacheUpdate.php index eb54bc2a40..bc2b05cd98 100644 --- a/includes/deferred/CdnCacheUpdate.php +++ b/includes/deferred/CdnCacheUpdate.php @@ -1,6 +1,6 @@ invalidateCache(); } /** - * Delete all previously generated thumbnails, refresh metadata in memcached and purge the squid. + * Delete all previously generated thumbnails, refresh metadata in memcached and purge the CDN. * * @param array $options An array potentially with the key forThumbRefresh. * @@ -878,7 +878,7 @@ class LocalFile extends File { // Delete thumbnails $this->purgeThumbnails( $options ); - // Purge squid cache for this file + // Purge CDN cache for this file DeferredUpdates::addUpdate( new CdnCacheUpdate( array( $this->getUrl() ) ), DeferredUpdates::PRESEND @@ -899,7 +899,7 @@ class LocalFile extends File { $dir = array_shift( $files ); $this->purgeThumbList( $dir, $files ); - // Purge the squid + // Purge the CDN $urls = array(); foreach ( $files as $file ) { $urls[] = $this->getArchiveThumbUrl( $archiveName, $file ); @@ -914,7 +914,7 @@ class LocalFile extends File { public function purgeThumbnails( $options = array() ) { // Delete thumbnails $files = $this->getThumbnails(); - // Always purge all files from squid regardless of handler filters + // Always purge all files from CDN regardless of handler filters $urls = array(); foreach ( $files as $file ) { $urls[] = $this->getThumbUrl( $file ); @@ -935,7 +935,7 @@ class LocalFile extends File { $dir = array_shift( $files ); $this->purgeThumbList( $dir, $files ); - // Purge the squid + // Purge the CDN DeferredUpdates::addUpdate( new CdnCacheUpdate( $urls ), DeferredUpdates::PRESEND ); } @@ -1399,7 +1399,7 @@ class LocalFile extends File { if ( $newPageContent ) { # New file page; create the description page. # There's already a log entry, so don't make a second RC entry - # Squid and file cache for the description page are purged by doEditContent. + # CDN and file cache for the description page are purged by doEditContent. $status = $wikiPage->doEditContent( $newPageContent, $comment, @@ -1434,7 +1434,7 @@ class LocalFile extends File { if ( $reupload ) { # Delete old thumbnails $that->purgeThumbnails(); - # Remove the old file from the squid cache + # Remove the old file from the CDN cache DeferredUpdates::addUpdate( new CdnCacheUpdate( array( $that->getUrl() ) ), DeferredUpdates::PRESEND @@ -1632,7 +1632,7 @@ class LocalFile extends File { } ); - // Purge the squid + // Purge the CDN $purgeUrls = array(); foreach ( $archiveNames as $archiveName ) { $purgeUrls[] = $this->getArchiveUrl( $archiveName ); diff --git a/includes/jobqueue/README b/includes/jobqueue/README index af836bc502..2073b0f841 100644 --- a/includes/jobqueue/README +++ b/includes/jobqueue/README @@ -11,7 +11,7 @@ The data model consist of the following main components: background. All jobs subclass the Job object and put the main logic in the function called run(). * The JobQueue object represents a particular queue of jobs of a certain type. - For example there may be a queue for email jobs and a queue for squid purge + For example there may be a queue for email jobs and a queue for CDN purge jobs. \section jobqueue Job queues @@ -45,7 +45,7 @@ In-memory queues may lose data when restarted depending on snapshot and journal settings (including journal fsync() frequency). Some queue types may totally remove jobs when dequeued while leaving the ack() function as a no-op; if a job is dequeued by a job runner, which crashes before completion, the job will be -lost. Some jobs, like purging squid caches after a template change, may not +lost. Some jobs, like purging CDN caches after a template change, may not require durable queues, whereas other jobs might be more important. \section aggregator Job queue aggregator diff --git a/includes/jobqueue/jobs/HTMLCacheUpdateJob.php b/includes/jobqueue/jobs/HTMLCacheUpdateJob.php index cffd564019..df0a66e409 100644 --- a/includes/jobqueue/jobs/HTMLCacheUpdateJob.php +++ b/includes/jobqueue/jobs/HTMLCacheUpdateJob.php @@ -139,7 +139,7 @@ class HTMLCacheUpdateJob extends Job { __METHOD__ ) ); - // Update squid + // Update CDN $u = CdnCacheUpdate::newFromTitles( $titleArray ); $u->doUpdate(); diff --git a/includes/page/WikiPage.php b/includes/page/WikiPage.php index be5ecbaa49..a289382e9d 100644 --- a/includes/page/WikiPage.php +++ b/includes/page/WikiPage.php @@ -3317,7 +3317,7 @@ class WikiPage implements Page, IDBAccessObject { // Invalidate the caches of all pages which redirect here DeferredUpdates::addUpdate( new HTMLCacheUpdate( $title, 'redirect' ) ); - // Purge squid for this page only + // Purge CDN for this page only $title->purgeSquid(); // Clear file cache for this page only HTMLFileCache::clearFileCache( $title ); diff --git a/includes/skins/Skin.php b/includes/skins/Skin.php index a6a6814f06..ec7c447ff0 100644 --- a/includes/skins/Skin.php +++ b/includes/skins/Skin.php @@ -1445,7 +1445,7 @@ abstract class Skin extends ContextSource { )->numParams( $plural ); } $newMessagesAlert = $newMessagesAlert->text(); - # Disable Squid cache + # Disable CDN cache $out->setCdnMaxage( 0 ); } elseif ( count( $newtalks ) ) { $sep = $this->msg( 'newtalkseparator' )->escaped(); diff --git a/includes/specials/SpecialRevisiondelete.php b/includes/specials/SpecialRevisiondelete.php index 65cb8e5004..5ed0483db9 100644 --- a/includes/specials/SpecialRevisiondelete.php +++ b/includes/specials/SpecialRevisiondelete.php @@ -329,10 +329,10 @@ class SpecialRevisionDelete extends UnlistedSpecialPage { return; } $this->getOutput()->disable(); - # We mustn't allow the output to be Squid cached, otherwise + # We mustn't allow the output to be CDN cached, otherwise # if an admin previews a deleted image, and it's cached, then # a user without appropriate permissions can toddle off and - # nab the image, and Squid will serve it + # nab the image, and CDN will serve it $this->getRequest()->response()->header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', 0 ) . ' GMT' ); $this->getRequest()->response()->header( 'Cache-Control: no-cache, no-store, max-age=0, must-revalidate' diff --git a/includes/specials/SpecialUndelete.php b/includes/specials/SpecialUndelete.php index 0f07ca991c..4c79c926f2 100644 --- a/includes/specials/SpecialUndelete.php +++ b/includes/specials/SpecialUndelete.php @@ -1197,10 +1197,10 @@ class SpecialUndelete extends SpecialPage { private function showFile( $key ) { $this->getOutput()->disable(); - # We mustn't allow the output to be Squid cached, otherwise + # We mustn't allow the output to be CDN cached, otherwise # if an admin previews a deleted image, and it's cached, then # a user without appropriate permissions can toddle off and - # nab the image, and Squid will serve it + # nab the image, and CDN will serve it $response = $this->getRequest()->response(); $response->header( 'Expires: ' . gmdate( 'D, d M Y H:i:s', 0 ) . ' GMT' ); $response->header( 'Cache-Control: no-cache, no-store, max-age=0, must-revalidate' ); diff --git a/includes/utils/IP.php b/includes/utils/IP.php index 119805e8de..fd7030eb87 100644 --- a/includes/utils/IP.php +++ b/includes/utils/IP.php @@ -713,7 +713,7 @@ class IP { /** * Checks if an IP is a trusted proxy provider. * Useful to tell if X-Forwarded-For data is possibly bogus. - * Squid cache servers for the site are whitelisted. + * CDN cache servers for the site are whitelisted. * @since 1.24 * * @param string $ip -- 2.20.1