Index: trunk/extensions/Translate/tag/TranslatablePage.php |
— | — | @@ -617,15 +617,15 @@ |
618 | 618 | } |
619 | 619 | |
620 | 620 | public function getTranslationPercentages( $force = false ) { |
621 | | - // Check the memory cache, as this is very slow to calculate |
622 | | - global $wgMemc, $wgRequest; |
| 621 | + global $wgRequest; |
623 | 622 | |
| 623 | + // Check the cache, as this is relatively slow to calculate |
624 | 624 | $memcKey = wfMemcKey( 'pt', 'status', $this->getTitle()->getPrefixedText() ); |
625 | | - $cache = $wgMemc->get( $memcKey ); |
| 625 | + $cached = wfGetCache( CACHE_ANYTHING )->get( $memcKey ); |
626 | 626 | |
627 | 627 | $force = $force || $wgRequest->getText( 'action' ) === 'purge'; |
628 | | - if ( !$force && is_array( $cache ) ) { |
629 | | - return $cache; |
| 628 | + if ( !$force && is_array( $cached ) ) { |
| 629 | + return $cached; |
630 | 630 | } |
631 | 631 | |
632 | 632 | $titles = $this->getTranslationPages(); |
— | — | @@ -653,7 +653,7 @@ |
654 | 654 | |
655 | 655 | $temp[$wgContLang->getCode()] = 1.00; |
656 | 656 | |
657 | | - $wgMemc->set( $memcKey, $temp, 60 * 60 * 12 ); |
| 657 | + wfGetCache( CACHE_ANYTHING )->set( $memcKey, $temp, 60 * 60 * 12 ); |
658 | 658 | |
659 | 659 | return $temp; |
660 | 660 | } |