Index: trunk/phase3/includes/ObjectCache.php |
— | — | @@ -48,23 +48,21 @@ |
49 | 49 | } |
50 | 50 | |
51 | 51 | if ( $type == CACHE_MEMCACHED ) { |
52 | | - if ( !array_key_exists( CACHE_MEMCACHED, $wgCaches ) ){ |
| 52 | + if ( !array_key_exists( CACHE_MEMCACHED, $wgCaches ) ) { |
53 | 53 | require_once( 'memcached-client.php' ); |
54 | | - |
55 | | - if (!class_exists("MemcachedClientforWiki")) { |
| 54 | + if ( !class_exists("MemcachedClientforWiki") ) { |
56 | 55 | class MemCachedClientforWiki extends memcached { |
57 | 56 | function _debugprint( $text ) { |
58 | 57 | wfDebug( "memcached: $text" ); |
59 | 58 | } |
60 | 59 | } |
61 | 60 | } |
62 | | - |
63 | | - $wgCaches[CACHE_DB] = new MemCachedClientforWiki( |
| 61 | + $wgCaches[CACHE_MEMCACHED] = new MemCachedClientforWiki( |
64 | 62 | array('persistant' => $wgMemCachedPersistent, 'compress_threshold' => 1500 ) ); |
65 | | - $cache =& $wgCaches[CACHE_DB]; |
66 | | - $cache->set_servers( $wgMemCachedServers ); |
67 | | - $cache->set_debug( $wgMemCachedDebug ); |
| 63 | + $wgCaches[CACHE_MEMCACHED]->set_servers( $wgMemCachedServers ); |
| 64 | + $wgCaches[CACHE_MEMCACHED]->set_debug( $wgMemCachedDebug ); |
68 | 65 | } |
| 66 | + $cache =& $wgCaches[CACHE_MEMCACHED]; |
69 | 67 | } elseif ( $type == CACHE_ACCEL ) { |
70 | 68 | if ( !array_key_exists( CACHE_ACCEL, $wgCaches ) ) { |
71 | 69 | if ( function_exists( 'eaccelerator_get' ) ) { |