Index: trunk/xpressme_integration_kit/class/config_from_xoops.class.php
===================================================================
--- trunk/xpressme_integration_kit/class/config_from_xoops.class.php	(revision 616)
+++ trunk/xpressme_integration_kit/class/config_from_xoops.class.php	(revision 657)
@@ -20,4 +20,5 @@
 	var $xoops_url;
 	var $xoops_trust_path;
+	var $xoops_cache_path;
 	var $xoops_db_prefix;
 	var $xoops_db_name;
@@ -101,4 +102,5 @@
 			$this->xoops_time_zone = date_default_timezone_get();
 		}
+		$this->_get_cache_path();
     }
 
@@ -253,5 +255,15 @@
 			if(defined('XOOPS_SALT')) $this->xoops_salt = XOOPS_SALT; else $this->xoops_salt = '';
 		} // end of if file_exists
-	}    	
+	}
+	
+	// call after the $this->xoops_trust_path is set
+	function _get_cache_path(){
+		$cache_path = $this->xoops_trust_path . '/cache';
+		if (file_exists($cache_path) && is_writable($cache_path)){
+			$this->xoops_cache_path = $cache_path;
+			return;
+		}
+		$this->xoops_cache_path = $this->xoops_root_path . '/cache';
+	}
     
     function get_xoops_mainfile_path(){
