r62583 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r62582‎ | r62583 | r62584 >
Date:12:56, 16 February 2010
Author:maxsem
Status:ok
Tags:
Comment:
Removed MMCache support, this thing is dead. Partially implements bug 19193
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/config/Installer.php (modified) (history)
  • /trunk/phase3/includes/AutoLoader.php (modified) (history)
  • /trunk/phase3/includes/BagOStuff.php (modified) (history)
  • /trunk/phase3/includes/DefaultSettings.php (modified) (history)
  • /trunk/phase3/includes/Defines.php (modified) (history)
  • /trunk/phase3/includes/ObjectCache.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Defines.php
@@ -103,7 +103,7 @@
104104 define( 'CACHE_NONE', 0 ); // Do not cache
105105 define( 'CACHE_DB', 1 ); // Store cache objects in the DB
106106 define( 'CACHE_MEMCACHED', 2 ); // MemCached, must specify servers in $wgMemCacheServers
107 -define( 'CACHE_ACCEL', 3 ); // eAccelerator or Turck, whichever is available
 107+define( 'CACHE_ACCEL', 3 ); // eAccelerator
108108 define( 'CACHE_DBA', 4 ); // Use PHP's DBA extension to store in a DBM-style database
109109 /**#@-*/
110110
Index: trunk/phase3/includes/BagOStuff.php
@@ -462,51 +462,6 @@
463463 class MediaWikiBagOStuff extends SqlBagOStuff { }
464464
465465 /**
466 - * This is a wrapper for Turck MMCache's shared memory functions.
467 - *
468 - * You can store objects with mmcache_put() and mmcache_get(), but Turck seems
469 - * to use a weird custom serializer that randomly segfaults. So we wrap calls
470 - * with serialize()/unserialize().
471 - *
472 - * The thing I noticed about the Turck serialized data was that unlike ordinary
473 - * serialize(), it contained the names of methods, and judging by the amount of
474 - * binary data, perhaps even the bytecode of the methods themselves. It may be
475 - * that Turck's serializer is faster, so a possible future extension would be
476 - * to use it for arrays but not for objects.
477 - *
478 - * @ingroup Cache
479 - */
480 -class TurckBagOStuff extends BagOStuff {
481 - public function get( $key ) {
482 - $val = mmcache_get( $key );
483 - if ( is_string( $val ) ) {
484 - $val = unserialize( $val );
485 - }
486 - return $val;
487 - }
488 -
489 - public function set( $key, $value, $exptime = 0 ) {
490 - mmcache_put( $key, serialize( $value ), $exptime );
491 - return true;
492 - }
493 -
494 - public function delete( $key, $time = 0 ) {
495 - mmcache_rm( $key );
496 - return true;
497 - }
498 -
499 - public function lock( $key, $waitTimeout = 0 ) {
500 - mmcache_lock( $key );
501 - return true;
502 - }
503 -
504 - public function unlock( $key ) {
505 - mmcache_unlock( $key );
506 - return true;
507 - }
508 -}
509 -
510 -/**
511466 * This is a wrapper for APC's shared memory functions
512467 *
513468 * @ingroup Cache
@@ -544,7 +499,7 @@
545500 /**
546501 * This is a wrapper for eAccelerator's shared memory functions.
547502 *
548 - * This is basically identical to the Turck MMCache version,
 503+ * This is basically identical to the deceased Turck MMCache version,
549504 * mostly because eAccelerator is based on Turck MMCache.
550505 *
551506 * @ingroup Cache
Index: trunk/phase3/includes/ObjectCache.php
@@ -66,8 +66,6 @@
6767 $wgCaches[CACHE_ACCEL] = new APCBagOStuff;
6868 } elseif( function_exists( 'xcache_get' ) ) {
6969 $wgCaches[CACHE_ACCEL] = new XCacheBagOStuff();
70 - } elseif ( function_exists( 'mmcache_get' ) ) {
71 - $wgCaches[CACHE_ACCEL] = new TurckBagOStuff;
7270 } else {
7371 $wgCaches[CACHE_ACCEL] = false;
7472 }
Index: trunk/phase3/includes/AutoLoader.php
@@ -231,7 +231,6 @@
232232 'TitleArrayFromResult' => 'includes/TitleArray.php',
233233 'TitleListDependency' => 'includes/CacheDependency.php',
234234 'TransformParameterError' => 'includes/MediaTransformOutput.php',
235 - 'TurckBagOStuff' => 'includes/BagOStuff.php',
236235 'UnlistedSpecialPage' => 'includes/SpecialPage.php',
237236 'UploadBase' => 'includes/upload/UploadBase.php',
238237 'UploadFromStash' => 'includes/upload/UploadFromStash.php',
Index: trunk/phase3/includes/DefaultSettings.php
@@ -1280,7 +1280,7 @@
12811281 $wgUseCategoryBrowser = false;
12821282
12831283 /**
1284 - * Keep parsed pages in a cache (objectcache table, turck, or memcached)
 1284+ * Keep parsed pages in a cache (objectcache table or memcached)
12851285 * to speed up output of the same page viewed by another user with the
12861286 * same options.
12871287 *
Index: trunk/phase3/config/Installer.php
@@ -503,11 +503,6 @@
504504 print "</li>\n";
505505 }
506506
507 -$conf->turck = function_exists( 'mmcache_get' );
508 -if ( $conf->turck ) {
509 - print "<li><a href=\"http://turck-mmcache.sourceforge.net/\">Turck MMCache</a> installed</li>\n";
510 -}
511 -
512507 $conf->xcache = function_exists( 'xcache_get' );
513508 if( $conf->xcache )
514509 print "<li><a href=\"http://trac.lighttpd.net/xcache/\">XCache</a> installed</li>\n";
@@ -519,15 +514,13 @@
520515
521516 $conf->eaccel = function_exists( 'eaccelerator_get' );
522517 if ( $conf->eaccel ) {
523 - $conf->turck = 'eaccelerator';
524518 print "<li><a href=\"http://eaccelerator.sourceforge.net/\">eAccelerator</a> installed</li>\n";
525519 }
526520
527521 $conf->dba = function_exists( 'dba_open' );
528522
529 -if( !( $conf->turck || $conf->eaccel || $conf->apc || $conf->xcache ) ) {
530 - echo( '<li>Couldn\'t find <a href="http://turck-mmcache.sourceforge.net">Turck MMCache</a>,
531 - <a href="http://eaccelerator.sourceforge.net">eAccelerator</a>,
 523+if( !( $conf->eaccel || $conf->apc || $conf->xcache ) ) {
 524+ echo( '<li>Couldn\'t find <a href="http://eaccelerator.sourceforge.net">eAccelerator</a>,
532525 <a href="http://www.php.net/apc">APC</a> or <a href="http://trac.lighttpd.net/xcache/">XCache</a>;
533526 cannot use these for object caching.</li>' );
534527 }
@@ -1459,11 +1452,6 @@
14601453 <ul class="plain">
14611454 <li><?php aField( $conf, "Shm", "No caching", "radio", "none" ); ?></li>
14621455 <?php
1463 - if ( $conf->turck ) {
1464 - echo "<li>";
1465 - aField( $conf, "Shm", "Turck MMCache", "radio", "turck" );
1466 - echo "</li>\n";
1467 - }
14681456 if( $conf->xcache ) {
14691457 echo "<li>";
14701458 aField( $conf, 'Shm', 'XCache', 'radio', 'xcache' );
@@ -1493,7 +1481,7 @@
14941482 An object caching system such as memcached will provide a significant performance boost,
14951483 but needs to be installed. Provide the server addresses and ports in a comma-separated list.
14961484 <br /><br />
1497 - MediaWiki can also detect and support eAccelerator, Turck MMCache, APC, and XCache, but
 1485+ MediaWiki can also detect and support eAccelerator, APC, and XCache, but
14981486 these should not be used if the wiki will be running on multiple application servers.
14991487 <br /><br />
15001488 DBA (Berkeley-style DB) is generally slower than using no cache at all, and is only
@@ -1805,7 +1793,6 @@
18061794 $cacheType = 'CACHE_MEMCACHED';
18071795 $mcservers = var_export( $conf->MCServerArray, true );
18081796 break;
1809 - case 'turck':
18101797 case 'xcache':
18111798 case 'apc':
18121799 case 'eaccel':
Index: trunk/phase3/RELEASE-NOTES
@@ -326,6 +326,7 @@
327327 * (bug 7264) Magic word to give Page Title as if pipe-trick performed on it
328328 {{pipetrick:}}
329329 * (bug 20339) Allow using the pipe trick in log reasons
 330+* Support for Turck MMCache was removed
330331
331332 === Bug fixes in 1.16 ===
332333

Status & tagging log