Removed MMCache support, this thing is dead. Partially implements bug 19193
authorMax Semenik <maxsem@users.mediawiki.org>
Tue, 16 Feb 2010 12:56:02 +0000 (12:56 +0000)
committerMax Semenik <maxsem@users.mediawiki.org>
Tue, 16 Feb 2010 12:56:02 +0000 (12:56 +0000)
RELEASE-NOTES
config/Installer.php
includes/AutoLoader.php
includes/BagOStuff.php
includes/DefaultSettings.php
includes/Defines.php
includes/ObjectCache.php

index 39842bf..873963a 100644 (file)
@@ -326,6 +326,7 @@ comment from another wiki.
 * (bug 7264)  Magic word to give Page Title as if pipe-trick performed on it
   {{pipetrick:}}
 * (bug 20339) Allow using the pipe trick in log reasons
+* Support for Turck MMCache was removed
 
 === Bug fixes in 1.16 ===
 
index d60f378..384a94b 100644 (file)
@@ -503,11 +503,6 @@ if( $memlimit == -1 ) {
        print "</li>\n";
 }
 
-$conf->turck = function_exists( 'mmcache_get' );
-if ( $conf->turck ) {
-       print "<li><a href=\"http://turck-mmcache.sourceforge.net/\">Turck MMCache</a> installed</li>\n";
-}
-
 $conf->xcache = function_exists( 'xcache_get' );
 if( $conf->xcache )
        print "<li><a href=\"http://trac.lighttpd.net/xcache/\">XCache</a> installed</li>\n";
@@ -519,15 +514,13 @@ if ($conf->apc ) {
 
 $conf->eaccel = function_exists( 'eaccelerator_get' );
 if ( $conf->eaccel ) {
-       $conf->turck = 'eaccelerator';
        print "<li><a href=\"http://eaccelerator.sourceforge.net/\">eAccelerator</a> installed</li>\n";
 }
 
 $conf->dba = function_exists( 'dba_open' );
 
-if( !( $conf->turck || $conf->eaccel || $conf->apc || $conf->xcache ) ) {
-       echo( '<li>Couldn\'t find <a href="http://turck-mmcache.sourceforge.net">Turck MMCache</a>,
-               <a href="http://eaccelerator.sourceforge.net">eAccelerator</a>,
+if( !( $conf->eaccel || $conf->apc || $conf->xcache ) ) {
+       echo( '<li>Couldn\'t find <a href="http://eaccelerator.sourceforge.net">eAccelerator</a>,
                <a href="http://www.php.net/apc">APC</a> or <a href="http://trac.lighttpd.net/xcache/">XCache</a>;
                cannot use these for object caching.</li>' );
 }
@@ -1459,11 +1452,6 @@ if( count( $errs ) ) {
                <ul class="plain">
                <li><?php aField( $conf, "Shm", "No caching", "radio", "none" ); ?></li>
                <?php
-                       if ( $conf->turck ) {
-                               echo "<li>";
-                               aField( $conf, "Shm", "Turck MMCache", "radio", "turck" );
-                               echo "</li>\n";
-                       }
                        if( $conf->xcache ) {
                                echo "<li>";
                                aField( $conf, 'Shm', 'XCache', 'radio', 'xcache' );
@@ -1493,7 +1481,7 @@ if( count( $errs ) ) {
                An object caching system such as memcached will provide a significant performance boost,
                but needs to be installed. Provide the server addresses and ports in a comma-separated list.
                <br /><br />
-               MediaWiki can also detect and support eAccelerator, Turck MMCache, APC, and XCache, but
+               MediaWiki can also detect and support eAccelerator, APC, and XCache, but
                these should not be used if the wiki will be running on multiple application servers.
                <br /><br />
                DBA (Berkeley-style DB) is generally slower than using no cache at all, and is only
@@ -1805,7 +1793,6 @@ function writeLocalSettings( $conf ) {
                        $cacheType = 'CACHE_MEMCACHED';
                        $mcservers = var_export( $conf->MCServerArray, true );
                        break;
-               case 'turck':
                case 'xcache':
                case 'apc':
                case 'eaccel':
index 4581634..0f8019d 100644 (file)
@@ -231,7 +231,6 @@ $wgAutoloadLocalClasses = array(
        'TitleArrayFromResult' => 'includes/TitleArray.php',
        'TitleListDependency' => 'includes/CacheDependency.php',
        'TransformParameterError' => 'includes/MediaTransformOutput.php',
-       'TurckBagOStuff' => 'includes/BagOStuff.php',
        'UnlistedSpecialPage' => 'includes/SpecialPage.php',
        'UploadBase' => 'includes/upload/UploadBase.php',
        'UploadFromStash' => 'includes/upload/UploadFromStash.php',
index afd52a0..ac0263d 100644 (file)
@@ -461,51 +461,6 @@ class SqlBagOStuff extends BagOStuff {
  */
 class MediaWikiBagOStuff extends SqlBagOStuff { }
 
-/**
- * This is a wrapper for Turck MMCache's shared memory functions.
- *
- * You can store objects with mmcache_put() and mmcache_get(), but Turck seems
- * to use a weird custom serializer that randomly segfaults. So we wrap calls
- * with serialize()/unserialize().
- *
- * The thing I noticed about the Turck serialized data was that unlike ordinary
- * serialize(), it contained the names of methods, and judging by the amount of
- * binary data, perhaps even the bytecode of the methods themselves. It may be
- * that Turck's serializer is faster, so a possible future extension would be
- * to use it for arrays but not for objects.
- *
- * @ingroup Cache
- */
-class TurckBagOStuff extends BagOStuff {
-       public function get( $key ) {
-               $val = mmcache_get( $key );
-               if ( is_string( $val ) ) {
-                       $val = unserialize( $val );
-               }
-               return $val;
-       }
-
-       public function set( $key, $value, $exptime = 0 ) {
-               mmcache_put( $key, serialize( $value ), $exptime );
-               return true;
-       }
-
-       public function delete( $key, $time = 0 ) {
-               mmcache_rm( $key );
-               return true;
-       }
-
-       public function lock( $key, $waitTimeout = 0 ) {
-               mmcache_lock( $key );
-               return true;
-       }
-
-       public function unlock( $key ) {
-               mmcache_unlock( $key );
-               return true;
-       }
-}
-
 /**
  * This is a wrapper for APC's shared memory functions
  *
@@ -544,7 +499,7 @@ class APCBagOStuff extends BagOStuff {
 /**
  * This is a wrapper for eAccelerator's shared memory functions.
  *
- * This is basically identical to the Turck MMCache version,
+ * This is basically identical to the deceased Turck MMCache version,
  * mostly because eAccelerator is based on Turck MMCache.
  *
  * @ingroup Cache
index c38c380..75f5a56 100644 (file)
@@ -1280,7 +1280,7 @@ $wgDevelopmentWarnings = false;
 $wgUseCategoryBrowser   = false;
 
 /**
- * Keep parsed pages in a cache (objectcache table, turck, or memcached)
+ * Keep parsed pages in a cache (objectcache table or memcached)
  * to speed up output of the same page viewed by another user with the
  * same options.
  *
index 02ddc88..7be569a 100644 (file)
@@ -103,7 +103,7 @@ define( 'CACHE_ANYTHING', -1 );  // Use anything, as long as it works
 define( 'CACHE_NONE', 0 );       // Do not cache
 define( 'CACHE_DB', 1 );         // Store cache objects in the DB
 define( 'CACHE_MEMCACHED', 2 );  // MemCached, must specify servers in $wgMemCacheServers
-define( 'CACHE_ACCEL', 3 );      // eAccelerator or Turck, whichever is available
+define( 'CACHE_ACCEL', 3 );      // eAccelerator
 define( 'CACHE_DBA', 4 );        // Use PHP's DBA extension to store in a DBM-style database
 /**#@-*/
 
index b52745b..f83e002 100644 (file)
@@ -66,8 +66,6 @@ function &wfGetCache( $inputType ) {
                                $wgCaches[CACHE_ACCEL] = new APCBagOStuff;
                        } elseif( function_exists( 'xcache_get' ) ) {
                                $wgCaches[CACHE_ACCEL] = new XCacheBagOStuff();
-                       } elseif ( function_exists( 'mmcache_get' ) ) {
-                               $wgCaches[CACHE_ACCEL] = new TurckBagOStuff;
                        } else {
                                $wgCaches[CACHE_ACCEL] = false;
                        }