core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/SDKCacheUtils.java
branchC3_BUILDER_WORK
changeset 1808 88695467fd04
parent 1621 393b985a50f3
child 1847 5a696c4ef747
--- a/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/SDKCacheUtils.java	Wed Aug 11 11:52:30 2010 -0500
+++ b/core/com.nokia.carbide.cpp.sdk.core/src/com/nokia/carbide/cpp/internal/api/sdk/SDKCacheUtils.java	Wed Aug 11 14:32:13 2010 -0500
@@ -17,12 +17,25 @@
 import java.io.ObjectStreamClass;
 
 import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
 
 import com.nokia.carbide.cpp.sdk.core.SDKCorePlugin;
 import com.nokia.cpp.internal.api.utils.core.CacheUtils;
 
 public class SDKCacheUtils extends CacheUtils {
 
+	private static final String CACHE_FOLDER_NAME = "CarbideSDKCache"; //$NON-NLS-1$
+	private static SDKCacheUtils cache;
+
+	public static SDKCacheUtils getCache() {
+		if (cache == null)
+		{
+			IPath path = new Path(System.getProperty("user.home"));
+			cache = new SDKCacheUtils(path.append(CACHE_FOLDER_NAME));
+		}
+		return cache;
+	}
+
 	public SDKCacheUtils(IPath defaultLocation) {
 		super(defaultLocation);
 	}