From: Aaron Schulz Date: Wed, 9 Apr 2008 20:21:07 +0000 (+0000) Subject: Remove old-fashioned $wgLinkCacheMemcached stuff X-Git-Tag: 1.31.0-rc.0~48475 X-Git-Url: http://git.cyclocoop.org/%22.%24image2.%22?a=commitdiff_plain;h=c6f76329ac9c384df85bef723bc03e623d2d0bb5;p=lhc%2Fweb%2Fwiklou.git Remove old-fashioned $wgLinkCacheMemcached stuff --- diff --git a/includes/DefaultSettings.php b/includes/DefaultSettings.php index e3efe8c4cc..b92c012bec 100644 --- a/includes/DefaultSettings.php +++ b/includes/DefaultSettings.php @@ -712,7 +712,6 @@ $wgParserCacheType = CACHE_ANYTHING; $wgParserCacheExpireTime = 86400; $wgSessionsInMemcached = false; -$wgLinkCacheMemcached = false; # Not fully tested /** * Memcached-specific settings diff --git a/includes/LinkCache.php b/includes/LinkCache.php index 5ce0133714..abfdfc5e94 100644 --- a/includes/LinkCache.php +++ b/includes/LinkCache.php @@ -32,10 +32,6 @@ class LinkCache { $this->mBadLinks = array(); } - private function getKey( $title ) { - return wfMemcKey( 'lc', 'title', $title ); - } - /** * General accessor to get/set whether SELECT FOR UPDATE should be used */ @@ -98,11 +94,8 @@ class LinkCache { $this->clearLink( $title ); } - public function clearLink( $title ) { - global $wgMemc, $wgLinkCacheMemcached; - if( $wgLinkCacheMemcached ) - $wgMemc->delete( $this->getKey( $title ) ); - } + /* obsolete, for old $wgLinkCacheMemcached stuff */ + public function clearLink( $title ) {} public function getPageLinks() { return $this->mPageLinks; } public function getGoodLinks() { return $this->mGoodLinks; } @@ -132,7 +125,7 @@ class LinkCache { * @return integer */ public function addLinkObj( &$nt, $len = -1, $redirect = NULL ) { - global $wgMemc, $wgLinkCacheMemcached, $wgAntiLockFlags; + global $wgAntiLockFlags; $title = $nt->getPrefixedDBkey(); if ( $this->isBadLink( $title ) ) { return 0; } $id = $this->getGoodLinkID( $title ); @@ -156,9 +149,6 @@ class LinkCache { # Some fields heavily used for linking... $id = NULL; - if( $wgLinkCacheMemcached ) { - $id = $wgMemc->get( $key = $this->getKey( $title ) ); - } if( !is_integer( $id ) ) { if ( $this->mForUpdate ) { $db = wfGetDB( DB_MASTER ); @@ -180,10 +170,6 @@ class LinkCache { $id = $s ? $s->page_id : 0; $len = $s ? $s->page_len : -1; $redirect = $s ? $s->page_is_redirect : 0; - - if( $wgLinkCacheMemcached ) { - $wgMemc->add( $key, $id, 3600*24 ); - } } if( 0 == $id ) {