http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72883

Revision: 72883
Author:   ialex
Date:     2010-09-12 19:26:01 +0000 (Sun, 12 Sep 2010)

Log Message:
-----------
Removed trailing spaces

Modified Paths:
--------------
    trunk/phase3/includes/parser/ParserCache.php

Modified: trunk/phase3/includes/parser/ParserCache.php
===================================================================
--- trunk/phase3/includes/parser/ParserCache.php        2010-09-12 19:22:55 UTC 
(rev 72882)
+++ trunk/phase3/includes/parser/ParserCache.php        2010-09-12 19:26:01 UTC 
(rev 72883)
@@ -37,14 +37,14 @@
                }
                $this->mMemc = $memCached;
        }
-       
+
        protected function getParserOutputKey( $article, $hash ) {
                global $wgRequest;
-               
+
                // idhash seem to mean 'page id' + 'rendering hash' (r3710)
                $pageid = $article->getID();
                $renderkey = (int)($wgRequest->getVal('action') == 'render');
-               
+
                $key = wfMemcKey( 'pcache', 'idhash', 
"{$pageid}-{$renderkey}!{$hash}" );
                return $key;
        }
@@ -55,17 +55,17 @@
        }
 
        /**
-        * Provides an E-Tag suitable for the whole page. Note that $article 
-        * is just the main wikitext. The E-Tag has to be unique to the whole 
-        * page, even if the article itself is the same, so it uses the 
-        * complete set of user options. We don't want to use the preference 
-        * of a different user on a message just because it wasn't used in 
-        * $article. For example give a Chinese interface to a user with 
-        * English preferences. That's why we take into account *all* user 
+        * Provides an E-Tag suitable for the whole page. Note that $article
+        * is just the main wikitext. The E-Tag has to be unique to the whole
+        * page, even if the article itself is the same, so it uses the
+        * complete set of user options. We don't want to use the preference
+        * of a different user on a message just because it wasn't used in
+        * $article. For example give a Chinese interface to a user with
+        * English preferences. That's why we take into account *all* user
         * options. (r70809 CR)
         */
        function getETag( $article, $popts ) {
-               return 'W/"' . $this->getParserOutputKey( $article, 
+               return 'W/"' . $this->getParserOutputKey( $article,
                        $popts->optionsHash( ParserOptions::legacyOptions() ) ) 
.
                                "--" . $article->mTouched . '"';
        }
@@ -80,19 +80,19 @@
 
        /**
         * Used to provide a unique id for the PoolCounter.
-        * It would be preferable to have this code in get() 
+        * It would be preferable to have this code in get()
         * instead of having Article looking in our internals.
-        * 
+        *
         * Precondition: $article->checkTouched() has been called.
         */
        public function getKey( $article, $popts, $useOutdated = true ) {
                global $wgCacheEpoch;
-               
+
                if( $popts instanceof User ) {
                        wfWarn( "Use of outdated prototype ParserCache::getKey( 
&\$article, &\$user )\n" );
                        $popts = ParserOptions::newFromUser( $popts );
                }
-               
+
                // Determine the options which affect this article
                $optionsKey = $this->mMemc->get( $this->getOptionsKey( $article 
) );
                if ( $optionsKey != false ) {
@@ -102,12 +102,12 @@
                                wfDebug( "Parser options key expired, touched 
{$article->mTouched}, epoch $wgCacheEpoch, cached $cacheTime\n" );
                                return false;
                        }
-                       
+
                        $usedOptions = $optionsKey->mUsedOptions;
                        wfDebug( "Parser cache options found.\n" );
                } else {
                        # TODO: Fail here $wgParserCacheExpireTime after 
deployment unless $useOutdated
-                       
+
                        $usedOptions = ParserOptions::legacyOptions();
                }
 
@@ -131,7 +131,7 @@
 
                // Having called checkTouched() ensures this will be loaded
                $touched = $article->mTouched;
-               
+
                $parserOutputKey = $this->getKey( $article, $popts, 
$useOutdated );
                if ( $parserOutputKey === false ) {
                        wfProfileOut( __METHOD__ );
@@ -147,7 +147,7 @@
                }
 
                wfDebug( "Found.\n" );
-               
+
                if ( !$useOutdated && $value->expired( $touched ) ) {
                        wfIncrStats( "pcache_miss_expired" );
                        $cacheTime = $value->getCacheTime();
@@ -168,13 +168,13 @@
        public function save( $parserOutput, $article, $popts ) {
                $expire = $parserOutput->getCacheExpiry();
 
-               if( $expire > 0 ) {                     
+               if( $expire > 0 ) {
                        $now = wfTimestampNow();
 
-                       $optionsKey = new CacheTime;                    
+                       $optionsKey = new CacheTime;
                        $optionsKey->mUsedOptions = $popts->usedOptions();
                        $optionsKey->updateCacheExpiry( $expire );
-                       
+
                        $optionsKey->setCacheTime( $now );
                        $parserOutput->setCacheTime( $now );
 



_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to