Convert showPatrolFooter() to using WAN cache
authorAaron Schulz <aschulz@wikimedia.org>
Wed, 21 Oct 2015 11:06:42 +0000 (04:06 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Wed, 21 Oct 2015 11:06:42 +0000 (04:06 -0700)
Change-Id: I55503eab91d0c64b2dcbc86257088a3eac52a2a1

includes/page/Article.php

index 4fdaea1..43b1a47 100644 (file)
@@ -1075,7 +1075,6 @@ class Article implements Page {
 
                $outputPage = $this->getContext()->getOutput();
                $user = $this->getContext()->getUser();
-               $cache = wfGetMainCache();
                $rc = false;
 
                if ( !$this->getTitle()->quickUserCan( 'patrol', $user )
@@ -1100,7 +1099,8 @@ class Article implements Page {
                }
 
                // Check for cached results
-               $key = wfMemcKey( 'NotPatrollablePage', $this->getTitle()->getArticleID() );
+               $key = wfMemcKey( 'unpatrollable-page', $this->getTitle()->getArticleID() );
+               $cache = ObjectCache::getMainWANInstance();
                if ( $cache->get( $key ) ) {
                        return false;
                }