Index: branches/wmf-deployment/languages/LanguageConverter.php |
— | — | @@ -640,33 +640,6 @@ |
641 | 641 | } |
642 | 642 | |
643 | 643 | /** |
644 | | - * a write lock to the cache |
645 | | - * |
646 | | - * @private |
647 | | - */ |
648 | | - function lockCache() { |
649 | | - global $wgMemc; |
650 | | - $success = false; |
651 | | - for($i=0; $i<30; $i++) { |
652 | | - if($success = $wgMemc->add($this->mCacheKey . "lock", 1, 10)) |
653 | | - break; |
654 | | - sleep(1); |
655 | | - } |
656 | | - return $success; |
657 | | - } |
658 | | - |
659 | | - /** |
660 | | - * unlock cache |
661 | | - * |
662 | | - * @private |
663 | | - */ |
664 | | - function unlockCache() { |
665 | | - global $wgMemc; |
666 | | - $wgMemc->delete($this->mCacheKey . "lock"); |
667 | | - } |
668 | | - |
669 | | - |
670 | | - /** |
671 | 644 | * Load default conversion tables |
672 | 645 | * This method must be implemented in derived class |
673 | 646 | * |
— | — | @@ -706,11 +679,8 @@ |
707 | 680 | |
708 | 681 | $this->postLoadTables(); |
709 | 682 | $this->mTables[self::CACHE_VERSION_KEY] = true; |
710 | | - |
711 | | - if($this->lockCache()) { |
712 | | - $wgMemc->set($this->mCacheKey, $this->mTables, 43200); |
713 | | - $this->unlockCache(); |
714 | | - } |
| 683 | + |
| 684 | + $wgMemc->set($this->mCacheKey, $this->mTables, 43200); |
715 | 685 | wfProfileOut( __METHOD__.'-recache' ); |
716 | 686 | } |
717 | 687 | wfProfileOut( __METHOD__ ); |