$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 );
}