From 8fa04e72f6a31af8aec7ee1ea3a5320fcc18ad6f Mon Sep 17 00:00:00 2001
From: felmer <felmer>
Date: Wed, 16 Jan 2013 13:34:51 +0000
Subject: [PATCH] SP-439 BIS-255: Only global workspace for cache

SVN: 28120
---
 .../dss/generic/shared/content/ContentCache.java  | 15 ++++-----------
 1 file changed, 4 insertions(+), 11 deletions(-)

diff --git a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/shared/content/ContentCache.java b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/shared/content/ContentCache.java
index de69014756c..86932bd3bc7 100644
--- a/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/shared/content/ContentCache.java
+++ b/datastore_server/source/java/ch/systemsx/cisd/openbis/dss/generic/shared/content/ContentCache.java
@@ -40,7 +40,6 @@ import ch.systemsx.cisd.common.utilities.ITimeProvider;
 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.dto.DataSetPathInfo;
-import ch.systemsx.cisd.openbis.dss.generic.shared.utils.SessionWorkspaceUtil;
 import ch.systemsx.cisd.openbis.generic.shared.basic.dto.IDatasetLocation;
 
 /**
@@ -58,16 +57,10 @@ public class ContentCache implements IContentCache
 
     public static ContentCache create(Properties properties)
     {
-        String workspacePathOrNull = properties.getProperty(CACHE_WORKSPACE_FOLDER_KEY);
-        boolean sessionCache = workspacePathOrNull == null;
-        File cacheWorkspace;
-        if (sessionCache)
-        {
-            cacheWorkspace = SessionWorkspaceUtil.getSessionWorkspace(properties);
-        } else
-        {
-            cacheWorkspace = new File(workspacePathOrNull);
-        }
+        String workspacePath =
+                properties.getProperty(CACHE_WORKSPACE_FOLDER_KEY, "../../data/dss-cache");
+        boolean sessionCache = workspacePath == null;
+        File cacheWorkspace = new File(workspacePath);
         return new ContentCache(new DssServiceRpcGenericFactory(), cacheWorkspace, sessionCache,
                 FileOperations.getInstance(), SystemTimeProvider.SYSTEM_TIME_PROVIDER);
     }
-- 
GitLab