Index: salesforce_api/salesforce_api.admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/salesforce/salesforce_api/salesforce_api.admin.inc,v
retrieving revision 1.2.2.10
diff -u -p -r1.2.2.10 salesforce_api.admin.inc
--- salesforce_api/salesforce_api.admin.inc	31 Jul 2009 08:04:05 -0000	1.2.2.10
+++ salesforce_api/salesforce_api.admin.inc	5 Nov 2009 15:50:38 -0000
@@ -13,13 +13,13 @@ function salesforce_api_settings_form() 
 
   // Use the username field to collapse the API settings fieldset.
   $username = variable_get('salesforce_api_username', '');
-
   $form['api'] = array(
     '#type' => 'fieldset',
     '#title' => t('Salesforce API settings'),
     '#description' => t('Use your Salesforce.com login information for these username and password fields.'),
     '#collapsible' => !empty($username),
-    '#collapsed' => !empty($username),
+    // Expand this fieldset if WSDL caching is disabled to remind admins of the setting.
+    '#collapsed' => !empty($username) && !variable_get('salesforce_api_disable_wsdl_cache', FALSE),
     '#weight' => -10,
   );
   $form['api']['salesforce_api_username'] = array(
@@ -42,6 +42,12 @@ function salesforce_api_settings_form() 
     '#required' => TRUE,
     '#default_value' => variable_get('salesforce_api_token', ''),
   );
+  $form['api']['salesforce_api_disable_wsdl_cache'] = array(
+    '#type' => 'checkbox',
+    '#title' => 'Disable PHP\'s SOAP WSDL cache',
+    '#description' => t('Check this box if you have recently updated your Salesforce toolkit\'s WSDL file or are having trouble connecting to Salesforce.'),
+    '#default_value' => variable_get('salesforce_api_disable_wsdl_cache', FALSE),
+  );  
 
   $form['log'] = array(
     '#type' => 'fieldset',
Index: salesforce_api/salesforce_api.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/salesforce/salesforce_api/salesforce_api.module,v
retrieving revision 1.2.2.21
diff -u -p -r1.2.2.21 salesforce_api.module
--- salesforce_api/salesforce_api.module	31 Aug 2009 15:00:22 -0000	1.2.2.21
+++ salesforce_api/salesforce_api.module	5 Nov 2009 15:50:38 -0000
@@ -123,6 +123,26 @@ function salesforce_api_perm() {
 }
 
 /**
+ * Implementation of hook_init
+ */
+function salesforce_api_init() {
+  if (variable_get('salesforce_api_disable_wsdl_cache', FALSE)) {
+    ini_set("soap.wsdl_cache_enabled", "0");
+    // Nag salesforce admins about wsdl caching.
+    if (user_access('administer salesforce') && empty($_SESSION['messages']['salesforce_api_disable_wsdl_cache'])) {
+      drupal_set_message(t('SOAP WSDL cache has been disabled by salesforce_api. This setting can affect performance and should be turned off in production settings. <a href="@link">Change your salesforce configuration to reenable caching.</a>', array('@link' => SALESFORCE_PATH_ADMIN)), 'salesforce_api_disable_wsdl_cache');
+    }
+  }
+}
+
+function salesforce_api_exit() {
+  // If this setting was changed during this page load, don't show this confusing message.
+  if (!variable_get('salesforce_api_disable_wsdl_cache', FALSE)) {
+    unset($_SESSION['messages']['salesforce_api_disable_wsdl_cache']);
+  }
+}
+
+/**
  * Creates an object used for communicating with the Salesforce server and
  *   performs a login to verify the API credentials.
  *
