Move config defaults to a central location
[gitphp.git] / include / git / projectlist / ProjectListBase.class.php
blob:a/include/git/projectlist/ProjectListBase.class.php -> blob:b/include/git/projectlist/ProjectListBase.class.php
--- a/include/git/projectlist/ProjectListBase.class.php
+++ b/include/git/projectlist/ProjectListBase.class.php
@@ -116,13 +116,13 @@
 			throw new GitPHP_MessageException(sprintf(__('%1$s is not a directory'), $this->projectRoot), true, 500);
 		}
 
-		$this->memoryCache = new GitPHP_MemoryCache(GitPHP_Config::GetInstance()->GetValue('objectmemory', 0));
-
-		if (GitPHP_Config::GetInstance()->GetValue('objectcache', false)) {
+		$this->memoryCache = new GitPHP_MemoryCache(GitPHP_Config::GetInstance()->GetValue('objectmemory'));
+
+		if (GitPHP_Config::GetInstance()->GetValue('objectcache')) {
 			$this->cache = new GitPHP_Cache();
-			$this->cache->SetServers(GitPHP_Config::GetInstance()->GetValue('memcache', null));
+			$this->cache->SetServers(GitPHP_Config::GetInstance()->GetValue('memcache'));
 			$this->cache->SetEnabled(true);
-			$this->cache->SetLifetime(GitPHP_Config::GetInstance()->GetValue('objectcachelifetime', 86400));
+			$this->cache->SetLifetime(GitPHP_Config::GetInstance()->GetValue('objectcachelifetime'));
 		}
 	}
 

comments