Index: includes/export.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ctools/includes/export.inc,v
retrieving revision 1.19
diff -u -p -r1.19 export.inc
--- includes/export.inc	17 Aug 2009 18:41:04 -0000	1.19
+++ includes/export.inc	1 Oct 2009 14:12:24 -0000
@@ -80,8 +80,8 @@ define('EXPORT_IN_CODE', 0x02);
  *   An array of arguments whose actual use is defined by the $type argument.
  */
 function ctools_export_load_object($table, $type = 'all', $args = array()) {
-  static $cache = array();
-  static $cached_database = array();
+  $cache = &drupal_static(__FUNCTION__);
+  $cached_database = &drupal_static('ctools_export_load_object_all');
 
   $schema = ctools_export_get_schema($table);
   $export = $schema['export'];
@@ -220,6 +220,27 @@ function ctools_export_load_object($tabl
 }
 
 /**
+ * Reset all static caches in ctools_export_load_object() or static caches for 
+ * a given table in ctools_export_load_object().
+ * 
+ * @param $table
+ *   String that is the name of a table. If not defined, all static caches in 
+ *   ctools_export_load_object() will be reset.
+ */
+function ctools_export_load_object_reset($table = NULL) {
+  if (empty($table)) {
+    drupal_static_reset('ctools_export_load_object');
+    drupal_static_reset('ctools_export_load_object_all');
+  }
+  else {
+    $cache = &drupal_static('ctools_export_load_object');
+    $cached_database = &drupal_static('ctools_export_load_object_all');
+    unset($cache[$table]);
+    unset($cached_database[$table]);
+  }
+}
+
+/**
  * Get the default version of an object, if it exists.
  *
  * This function doesn't care if an object is in the database or not and
