* @subpackage Cache
*/
-/** */
-if (!defined('MEDIAWIKI')) die( "Not a valid entry point\n");
-
-
/**
* FakeMemCachedClient imitates the API of memcached-client v. 0.1.2.
* It acts as a memcached server with no RAM, that is, all objects are
}
if ( $type == CACHE_MEMCACHED ) {
- if ( !array_key_exists( CACHE_MEMCACHED, $wgCaches ) ){
+ if ( !array_key_exists( CACHE_MEMCACHED, $wgCaches ) ){
require_once( 'memcached-client.php' );
-
+
if (!class_exists("MemcachedClientforWiki")) {
class MemCachedClientforWiki extends memcached {
function _debugprint( $text ) {
}
}
- $wgCaches[CACHE_DB] = new MemCachedClientforWiki(
- array('persistant' => true, 'compress_threshold' => 1500 ) );
+ $wgCaches[CACHE_DB] = new MemCachedClientforWiki(
+ array('persistant' => false, 'compress_threshold' => 1500 ) );
$cache =& $wgCaches[CACHE_DB];
$cache->set_servers( $wgMemCachedServers );
$cache->set_debug( $wgMemCachedDebug );
}
$cache =& $wgCaches[CACHE_DB];
}
-
+
if ( $cache === false ) {
if ( !array_key_exists( CACHE_NONE, $wgCaches ) ) {
$wgCaches[CACHE_NONE] = new FakeMemCachedClient;
function &wfGetMainCache() {
global $wgMainCacheType;
- return wfGetCache( $wgMainCacheType );
+ $ret =& wfGetCache( $wgMainCacheType );
+ return $ret;
}
function &wfGetMessageCacheStorage() {
global $wgMessageCacheType;
- return wfGetCache( $wgMessageCacheType );
+ $ret =& wfGetCache( $wgMessageCacheType );
+ return $ret;
}
-function wfGetParserCacheStorage() {
+function &wfGetParserCacheStorage() {
global $wgParserCacheType;
- return wfGetCache( $wgParserCacheType );
+ $ret =& wfGetCache( $wgParserCacheType );
+ return $ret;
}
?>