Replace "squid" with "CDN" in various comments
authorAaron Schulz <aschulz@wikimedia.org>
Thu, 10 Dec 2015 01:30:47 +0000 (17:30 -0800)
committerAaron Schulz <aschulz@wikimedia.org>
Thu, 10 Dec 2015 01:35:37 +0000 (17:35 -0800)
Change-Id: Idcc528daf28e119349155d36e30a9bcf61b2e7d5

19 files changed:
includes/AjaxResponse.php
includes/DefaultSettings.php
includes/EditPage.php
includes/GlobalFunctions.php
includes/MediaWiki.php
includes/OutputHandler.php
includes/OutputPage.php
includes/Setup.php
includes/Title.php
includes/actions/RawAction.php
includes/deferred/CdnCacheUpdate.php
includes/filerepo/file/LocalFile.php
includes/jobqueue/README
includes/jobqueue/jobs/HTMLCacheUpdateJob.php
includes/page/WikiPage.php
includes/skins/Skin.php
includes/specials/SpecialRevisiondelete.php
includes/specials/SpecialUndelete.php
includes/utils/IP.php

index 34bb65f..db989a4 100644 (file)
@@ -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"' );
index de364a6..236a3f9 100644 (file)
@@ -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.
  */
index c709d00..47912cb 100644 (file)
@@ -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" );
index 4c85bd6..603d259 100644 (file)
@@ -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
index 50f2dad..409d9e0 100644 (file)
@@ -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
index 39716ca..30f193c 100644 (file)
@@ -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
  */
index b7f5558..ea85358 100644 (file)
@@ -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 ) );
index a94bd12..e22184f 100644 (file)
@@ -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;
 }
index 440204b..e2c2143 100644 (file)
@@ -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.
         */
index b71b0e9..78197ab 100644 (file)
@@ -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;
                        }
                }
index eb54bc2..bc2b05c 100644 (file)
@@ -1,6 +1,6 @@
 <?php
 /**
- * Squid cache purging.
+ * CDN cache purging.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -24,7 +24,7 @@
 use Wikimedia\Assert\Assert;
 
 /**
- * Handles purging appropriate Squid URLs given a title (or titles)
+ * Handles purging appropriate CDN URLs given a title (or titles)
  * @ingroup Cache
  */
 class CdnCacheUpdate implements DeferrableUpdate, MergeableUpdate {
@@ -78,10 +78,9 @@ class CdnCacheUpdate implements DeferrableUpdate, MergeableUpdate {
        }
 
        /**
-        * Purges a list of Squids defined in $wgSquidServers.
+        * Purges a list of CDN nodes defined in $wgSquidServers.
         * $urlArr should contain the full URLs to purge as values
         * (example: $urlArr[] = 'http://my.host/something')
-        * XXX report broken Squids per mail or log
         *
         * @param string[] $urlArr List of full URLs to purge
         */
index b986b85..0da1ae8 100644 (file)
@@ -858,14 +858,14 @@ class LocalFile extends File {
        }
 
        /**
-        * Refresh metadata in memcached, but don't touch thumbnails or squid
+        * Refresh metadata in memcached, but don't touch thumbnails or CDN
         */
        function purgeMetadataCache() {
                $this->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 );
index af836bc..2073b0f 100644 (file)
@@ -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
index cffd564..df0a66e 100644 (file)
@@ -139,7 +139,7 @@ class HTMLCacheUpdateJob extends Job {
                        __METHOD__
                ) );
 
-               // Update squid
+               // Update CDN
                $u = CdnCacheUpdate::newFromTitles( $titleArray );
                $u->doUpdate();
 
index be5ecba..a289382 100644 (file)
@@ -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 );
index a6a6814..ec7c447 100644 (file)
@@ -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();
index 65cb8e5..5ed0483 100644 (file)
@@ -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'
index 0f07ca9..4c79c92 100644 (file)
@@ -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' );
index 119805e..fd7030e 100644 (file)
@@ -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