Index: HexagonBase/template.php
===================================================================
RCS file: /cvs/drupal-contrib/contributions/themes/hexagon/HexagonBase/Attic/template.php,v
retrieving revision 1.1.2.6
diff -u -p -r1.1.2.6 template.php
--- HexagonBase/template.php	24 May 2010 18:38:42 -0000	1.1.2.6
+++ HexagonBase/template.php	16 Jun 2010 23:51:27 -0000
@@ -31,9 +31,11 @@ include_once 'includes/theme_hook_proces
 init_theme();
 
 /**
- * Clear theme caches and/or theme registry when set to do so.
+ * Clear theme caches and theme registry when set to do so from .info.
+ * This also checks the state of modules. Ensures that enabling or disabling
+ * modules forces a refresh. This is important for module compatibility plug-ins.
  */
-if ((int) hex_setting('disable_theme_caching', 0) == 1) {
+if ((int) hex_setting('disable_theme_caching', 0) == 1 || module_list() != hex_plugin_module_state()) {
   drupal_rebuild_theme_registry();
   hex_clear_cache();
 }
@@ -52,7 +54,8 @@ foreach (array_merge(hex_active_themes()
  */
 function hex_init() {
 
-  // See if the theme registry needs to be rebuilt.
+  // See if the theme registry needs to be rebuilt. Cache must be checked directly.
+  // This will cause a double hit on the db but it's a minor side effect.
   if ($registry_is_empty = !cache_get('theme_registry:' . hex_active_theme(), 'cache')) {
     include_once hex_theme_path('hex') . '/includes/build_theme_registry.inc';
     hex_clear_cache();
@@ -89,7 +92,7 @@ function _hex_cache($key) {
       $cache[$key] = $cache_from_key->data;
     }
     else {
-      // Build and store plugin data.
+      // Build and store cache data.
       include_once hex_theme_path('hex') . "/includes/build_$key.inc";
       $cache[$key] = call_user_func("_hex_build_$key");
       cache_set("hex_$key:" . hex_active_theme(), $cache[$key]);
Index: HexagonBase/includes/build_plugins.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/themes/hexagon/HexagonBase/includes/Attic/build_plugins.inc,v
retrieving revision 1.1.2.3
diff -u -p -r1.1.2.3 build_plugins.inc
--- HexagonBase/includes/build_plugins.inc	27 May 2010 22:23:11 -0000	1.1.2.3
+++ HexagonBase/includes/build_plugins.inc	16 Jun 2010 23:51:27 -0000
@@ -136,6 +136,6 @@ function _hex_build_plugins() {
   // Alphabetical sort.
   ksort($plugins_active);
 
-  return array('active' => $plugins_active, 'all' => $plugins);
+  return array('active' => $plugins_active, 'all' => $plugins, 'module_list' => module_list());
 }
 
Index: HexagonBase/includes/plugins.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/themes/hexagon/HexagonBase/includes/Attic/plugins.inc,v
retrieving revision 1.1.2.3
diff -u -p -r1.1.2.3 plugins.inc
--- HexagonBase/includes/plugins.inc	8 Jun 2010 10:13:20 -0000	1.1.2.3
+++ HexagonBase/includes/plugins.inc	16 Jun 2010 23:51:27 -0000
@@ -85,3 +85,12 @@ function hex_plugin_list_by_owner($theme
   }
   return $list;
 }
+
+/**
+ * Simply returns a list of modules fetched when the plug-in data was built.
+ * Used to compare with module_list() and force a refresh when it differs.
+ */
+function hex_plugin_module_state() {
+  $plugins = _hex_cache('plugins');
+  return $plugins['module_list'];
+}
\ No newline at end of file
