fixed svn 805

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@807 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
orbiter 2005-09-28 14:47:57 +00:00
parent ca82d690a9
commit 1669eaaa1a

View File

@ -298,8 +298,14 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser
// create the cache directory
String cache = getConfig("proxyCache", "DATA/HTCACHE");
cache = cache.replace('\\', '/');
if (cache.endsWith("/")) { cache = cache.substring(0, cache.length() - 1); }
File htCachePath = new File(cache); // don't use rootPath
if (cache.endsWith("/")) { cache = cache.substring(0, cache.length() - 1); }
File htCachePath;
if (new File(cache).isAbsolute()) {
htCachePath = new File(cache); // don't use rootPath
} else {
htCachePath = new File(rootPath, cache);
}
this.log.logInfo("HTCACHE Path = " + htCachePath.getAbsolutePath());
long maxCacheSize = 1024 * 1024 * Long.parseLong(getConfig("proxyCacheSize", "2")); // this is megabyte
this.cacheManager = new plasmaHTCache(htCachePath, maxCacheSize, ramHTTP);