return ObjectCache::getInstance( $wgParserCacheType );
}
-/**
- * Get the cache object used by the language converter
- *
- * @return BagOStuff
- */
-function wfGetLangConverterCacheStorage() {
- global $wgLanguageConverterCacheType;
- return ObjectCache::getInstance( $wgLanguageConverterCacheType );
-}
-
/**
* Call hook functions defined in $wgHooks
*
$wgMemc = wfGetMainCache();
$messageMemc = wfGetMessageCacheStorage();
$parserMemc = wfGetParserCacheStorage();
-$wgLangConvMemc = wfGetLangConverterCacheStorage();
wfDebugLog( 'caches', 'main: ' . get_class( $wgMemc ) .
', message: ' . get_class( $messageMemc ) .
* @param bool $fromCache Load from memcached? Defaults to true.
*/
function loadTables( $fromCache = true ) {
- global $wgLangConvMemc;
+ global $wgLanguageConverterCacheType;
if ( $this->mTablesLoaded ) {
return;
$this->mTablesLoaded = true;
$this->mTables = false;
+ $cache = ObjectCache::getInstance( $wgLanguageConverterCacheType );
if ( $fromCache ) {
wfProfileIn( __METHOD__ . '-cache' );
- $this->mTables = $wgLangConvMemc->get( $this->mCacheKey );
+ $this->mTables = $cache->get( $this->mCacheKey );
wfProfileOut( __METHOD__ . '-cache' );
}
if ( !$this->mTables || !array_key_exists( self::CACHE_VERSION_KEY, $this->mTables ) ) {
$this->postLoadTables();
$this->mTables[self::CACHE_VERSION_KEY] = true;
- $wgLangConvMemc->set( $this->mCacheKey, $this->mTables, 43200 );
+ $cache->set( $this->mCacheKey, $this->mTables, 43200 );
wfProfileOut( __METHOD__ . '-recache' );
}
}