From: jenkins-bot Date: Thu, 5 Sep 2013 22:15:07 +0000 (+0000) Subject: Merge "Add cache versioning to InfoAction." X-Git-Tag: 1.31.0-rc.0~18801 X-Git-Url: http://git.cyclocoop.org/%22.%28%24lien.?a=commitdiff_plain;h=8fe0cf970401f2796ca39165a2d0a311b551c47a;p=lhc%2Fweb%2Fwiklou.git Merge "Add cache versioning to InfoAction." --- 8fe0cf970401f2796ca39165a2d0a311b551c47a diff --cc includes/actions/InfoAction.php index 2c0a87534d,f46314a175..7fc903399d --- a/includes/actions/InfoAction.php +++ b/includes/actions/InfoAction.php @@@ -198,12 -194,13 +200,14 @@@ class InfoAction extends FormlessActio $title = $this->getTitle(); $id = $title->getArticleID(); - $memcKey = wfMemcKey( 'infoaction', sha1( $title->getPrefixedText() ), $this->page->getLatest() ); + $memcKey = wfMemcKey( 'infoaction', + sha1( $title->getPrefixedText() ), $this->page->getLatest() ); $pageCounts = $wgMemc->get( $memcKey ); - if ( $pageCounts === false ) { + $version = isset( $pageCounts['cacheversion'] ) ? $pageCounts['cacheversion'] : false; + if ( $pageCounts === false || $version !== self::CACHE_VERSION ) { // Get page information that would be too "expensive" to retrieve by normal means $pageCounts = self::pageCounts( $title ); + $pageCounts['cacheversion'] = self::CACHE_VERSION; $wgMemc->set( $memcKey, $pageCounts ); }