Don't require an existence check before calling loadPageData(). Added an accessor...
[lhc/web/wiklou.git] / includes / ObjectCache.php
index f01171e..223f5ff 100644 (file)
@@ -4,10 +4,6 @@
  * @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
@@ -39,7 +35,7 @@ $wgCaches = array();
 
 /** @todo document */
 function &wfGetCache( $inputType ) {
-       global $wgCaches, $wgMemCachedServers, $wgMemCachedDebug;
+       global $wgCaches, $wgMemCachedServers, $wgMemCachedDebug, $wgMemCachedPersistent;
        $cache = false;
 
        if ( $inputType == CACHE_ANYTHING ) {
@@ -65,7 +61,7 @@ function &wfGetCache( $inputType ) {
                        }
 
                        $wgCaches[CACHE_DB] = new MemCachedClientforWiki(
-                               array('persistant' => false, 'compress_threshold' => 1500 ) );
+                               array('persistant' => $wgMemCachedPersistent, 'compress_threshold' => 1500 ) );
                        $cache =& $wgCaches[CACHE_DB];
                        $cache->set_servers( $wgMemCachedServers );
                        $cache->set_debug( $wgMemCachedDebug );