Merge "Remove incomplete and dated 'wgUseETag' experiment"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Wed, 29 Jun 2016 23:54:33 +0000 (23:54 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Wed, 29 Jun 2016 23:54:33 +0000 (23:54 +0000)
includes/DefaultSettings.php
includes/OutputPage.php
includes/page/Article.php

index 39e22a0..b8e1486 100644 (file)
@@ -2551,12 +2551,6 @@ $wgSidebarCacheExpiry = 86400;
  */
 $wgUseGzip = false;
 
-/**
- * Whether MediaWiki should send an ETag header. Seems to cause
- * broken behavior with Squid 2.6, see bug 7098.
- */
-$wgUseETag = false;
-
 /**
  * Clock skew or the one-second resolution of time() can occasionally cause cache
  * problems when the user requests two pages within a short period of time. This
index 5c7203d..15b70c8 100644 (file)
@@ -104,22 +104,11 @@ class OutputPage extends ContextSource {
        protected $mStatusCode;
 
        /**
-        * @var string Variable mLastModified and mEtag are used for sending cache control.
+        * @var string Used for sending cache control.
         *   The whole caching system should probably be moved into its own class.
         */
        protected $mLastModified = '';
 
-       /**
-        * Contains an HTTP Entity Tags (see RFC 2616 section 3.13) which is used
-        * as a unique identifier for the content. It is later used by the client
-        * to compare its cached version with the server version. Client sends
-        * headers If-Match and If-None-Match containing its locally cached ETAG value.
-        *
-        * To get more information, you will have to look at HTTP/1.1 protocol which
-        * is properly described in RFC 2616 : http://tools.ietf.org/html/rfc2616
-        */
-       private $mETag = false;
-
        /** @var array */
        protected $mCategoryLinks = [];
 
@@ -694,12 +683,10 @@ class OutputPage extends ContextSource {
        }
 
        /**
-        * Set the value of the ETag HTTP header, only used if $wgUseETag is true
-        *
-        * @param string $tag Value of "ETag" header
+        * @deprecated since 1.28 Obsolete - wgUseETag experiment was removed.
+        * @param string $tag
         */
-       function setETag( $tag ) {
-               $this->mETag = $tag;
+       public function setETag( $tag ) {
        }
 
        /**
@@ -2156,9 +2143,6 @@ class OutputPage extends ContextSource {
        public function sendCacheControl() {
                $response = $this->getRequest()->response();
                $config = $this->getConfig();
-               if ( $config->get( 'UseETag' ) && $this->mETag ) {
-                       $response->header( "ETag: $this->mETag" );
-               }
 
                $this->addVaryHeader( 'Cookie' );
                $this->addAcceptLanguage();
index 1f1e8d6..2a6f88c 100644 (file)
@@ -467,7 +467,7 @@ class Article implements Page {
         * page of the given title.
         */
        public function view() {
-               global $wgUseFileCache, $wgUseETag, $wgDebugToolbar, $wgMaxRedirects;
+               global $wgUseFileCache, $wgDebugToolbar, $wgMaxRedirects;
 
                # Get variables from query string
                # As side effect this will load the revision and update the title
@@ -520,10 +520,6 @@ class Article implements Page {
 
                # Try client and file cache
                if ( !$wgDebugToolbar && $oldid === 0 && $this->mPage->checkTouched() ) {
-                       if ( $wgUseETag ) {
-                               $outputPage->setETag( $parserCache->getETag( $this->mPage, $parserOptions ) );
-                       }
-
                        # Use the greatest of the page's timestamp or the timestamp of any
                        # redirect in the chain (bug 67849)
                        $timestamp = $this->mPage->getTouched();