Skip to content
Snippets Groups Projects
Commit 8fa04e72 authored by felmer's avatar felmer
Browse files

SP-439 BIS-255: Only global workspace for cache

SVN: 28120
parent 36bae40d
No related branches found
No related tags found
No related merge requests found
...@@ -40,7 +40,6 @@ import ch.systemsx.cisd.common.utilities.ITimeProvider; ...@@ -40,7 +40,6 @@ import ch.systemsx.cisd.common.utilities.ITimeProvider;
import ch.systemsx.cisd.common.utilities.SystemTimeProvider; import ch.systemsx.cisd.common.utilities.SystemTimeProvider;
import ch.systemsx.cisd.openbis.dss.generic.shared.api.v1.IDssServiceRpcGeneric; import ch.systemsx.cisd.openbis.dss.generic.shared.api.v1.IDssServiceRpcGeneric;
import ch.systemsx.cisd.openbis.dss.generic.shared.dto.DataSetPathInfo; import ch.systemsx.cisd.openbis.dss.generic.shared.dto.DataSetPathInfo;
import ch.systemsx.cisd.openbis.dss.generic.shared.utils.SessionWorkspaceUtil;
import ch.systemsx.cisd.openbis.generic.shared.basic.dto.IDatasetLocation; import ch.systemsx.cisd.openbis.generic.shared.basic.dto.IDatasetLocation;
/** /**
...@@ -58,16 +57,10 @@ public class ContentCache implements IContentCache ...@@ -58,16 +57,10 @@ public class ContentCache implements IContentCache
public static ContentCache create(Properties properties) public static ContentCache create(Properties properties)
{ {
String workspacePathOrNull = properties.getProperty(CACHE_WORKSPACE_FOLDER_KEY); String workspacePath =
boolean sessionCache = workspacePathOrNull == null; properties.getProperty(CACHE_WORKSPACE_FOLDER_KEY, "../../data/dss-cache");
File cacheWorkspace; boolean sessionCache = workspacePath == null;
if (sessionCache) File cacheWorkspace = new File(workspacePath);
{
cacheWorkspace = SessionWorkspaceUtil.getSessionWorkspace(properties);
} else
{
cacheWorkspace = new File(workspacePathOrNull);
}
return new ContentCache(new DssServiceRpcGenericFactory(), cacheWorkspace, sessionCache, return new ContentCache(new DssServiceRpcGenericFactory(), cacheWorkspace, sessionCache,
FileOperations.getInstance(), SystemTimeProvider.SYSTEM_TIME_PROVIDER); FileOperations.getInstance(), SystemTimeProvider.SYSTEM_TIME_PROVIDER);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment