http://www.mediawiki.org/wiki/Special:Code/MediaWiki/72411
Revision: 72411
Author: nikerabbit
Date: 2010-09-05 10:28:21 +0000 (Sun, 05 Sep 2010)
Log Message:
-----------
Prefer memcached + use canonical name for function
Modified Paths:
--------------
trunk/extensions/Translate/MessageGroups.php
Modified: trunk/extensions/Translate/MessageGroups.php
===================================================================
--- trunk/extensions/Translate/MessageGroups.php 2010-09-05 10:27:39 UTC
(rev 72410)
+++ trunk/extensions/Translate/MessageGroups.php 2010-09-05 10:28:21 UTC
(rev 72411)
@@ -897,7 +897,7 @@
global $wgTranslateCC, $wgTranslateEC, $wgTranslateAC;
global $wgAutoloadClasses;
- $key = wfMemckey( 'translate-groups' );
+ $key = wfMemcKey( 'translate-groups' );
$value = DependencyWrapper::getValueFromCache(
self::getCache(), $key );
if ( $value === null ) {
@@ -926,12 +926,14 @@
}
/**
- * Returns a cache object. Currently just wrapper for
- * database cache, but @todo could be improved or replaced
- * with something that prefers Memcached over db.
+ * Returns a cacher object.
*/
protected static function getCache() {
- return wfGetCache( CACHE_DB );
+ $cacher = wfGetCache( CACHE_MEMCACHED );
+ if ( $cacher instanceof FakeMemCachedClient ) {
+ $cacher = wfGetCache( CACHE_DB );
+ }
+ return $cacher;
}
/**
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs