Index: trunk/extensions/Translate/MessageGroups.php |
— | — | @@ -897,7 +897,7 @@ |
898 | 898 | global $wgTranslateCC, $wgTranslateEC, $wgTranslateAC; |
899 | 899 | global $wgAutoloadClasses; |
900 | 900 | |
901 | | - $key = wfMemckey( 'translate-groups' ); |
| 901 | + $key = wfMemcKey( 'translate-groups' ); |
902 | 902 | $value = DependencyWrapper::getValueFromCache( self::getCache(), $key ); |
903 | 903 | |
904 | 904 | if ( $value === null ) { |
— | — | @@ -926,12 +926,14 @@ |
927 | 927 | } |
928 | 928 | |
929 | 929 | /** |
930 | | - * Returns a cache object. Currently just wrapper for |
931 | | - * database cache, but @todo could be improved or replaced |
932 | | - * with something that prefers Memcached over db. |
| 930 | + * Returns a cacher object. |
933 | 931 | */ |
934 | 932 | protected static function getCache() { |
935 | | - return wfGetCache( CACHE_DB ); |
| 933 | + $cacher = wfGetCache( CACHE_MEMCACHED ); |
| 934 | + if ( $cacher instanceof FakeMemCachedClient ) { |
| 935 | + $cacher = wfGetCache( CACHE_DB ); |
| 936 | + } |
| 937 | + return $cacher; |
936 | 938 | } |
937 | 939 | |
938 | 940 | /** |