http://www.mediawiki.org/wiki/Special:Code/MediaWiki/71877
Revision: 71877
Author: nikerabbit
Date: 2010-08-29 11:03:35 +0000 (Sun, 29 Aug 2010)
Log Message:
-----------
Let import translations work without main memory cache defined
Modified Paths:
--------------
trunk/extensions/Translate/SpecialImportTranslations.php
Modified: trunk/extensions/Translate/SpecialImportTranslations.php
===================================================================
--- trunk/extensions/Translate/SpecialImportTranslations.php 2010-08-29
11:00:59 UTC (rev 71876)
+++ trunk/extensions/Translate/SpecialImportTranslations.php 2010-08-29
11:03:35 UTC (rev 71877)
@@ -273,29 +273,17 @@
}
protected function setCachedData( $data ) {
- global $wgMemc;
-
$key = wfMemcKey( 'translate', 'webimport',
$this->user->getId() );
-
- /**
- * Cache 15 minutes.
- */
- $wgMemc->set( $key, $data, 60 * 15 );
+ wfGetCache( CACHE_DB )->set( $key, $data, 60 * 30 );
}
protected function getCachedData() {
- global $wgMemc;
-
$key = wfMemcKey( 'translate', 'webimport',
$this->user->getId() );
-
- return $wgMemc->get( $key );
+ return wfGetCache( CACHE_DB )->get( $key );
}
protected function deleteCachedData() {
- global $wgMemc;
-
$key = wfMemcKey( 'translate', 'webimport',
$this->user->getId() );
-
- return $wgMemc->delete( $key );
+ return wfGetCache( CACHE_DB )->delete( $key );
}
}
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs