=== modified file 'uc_discount.module'
--- uc_discount.module	2009-05-20 15:02:39 +0000
+++ uc_discount.module	2009-06-02 18:17:48 +0000
@@ -50,6 +50,25 @@
       drupal_add_js(drupal_get_path('module', 'uc_discount') .'/uc_discount.js');
     }
   }
+  else {
+    $triggers = array_keys(uc_discount_ca_trigger());
+
+    if ($form_id == 'ca_predicate_meta_form') {
+      if ($predicate = ca_predicate_load($form['predicate_pid']['#value']) && in_array($predicate['#trigger'], $triggers)) {
+        $form['#submit'][] = 'uc_discount_clear_price_cache';
+      }
+    }
+    elseif ($form_id == 'ca_conditions_form' || $form_id == 'ca_actions_form') {
+      if ($predicate = ca_predicate_load($form['pid']['#value']) && in_array($predicate['#trigger'], $triggers)) {
+        if ($form_id == 'ca_conditions_form') {
+          $form['save']['#submit'][] = 'uc_discount_clear_price_cache';
+        }
+        else {
+          $form['submit']['#submit'][] = 'uc_discount_clear_price_cache';
+        }
+      }
+    }
+  }
 }
 
 /******************************************************************************
@@ -729,3 +748,12 @@
   }
   exit();
 }
+
+/**
+ * Form submit callback for discount CA predicates.
+ *
+ * Changes to discount conditions or actions invalidate cached prices.
+ */
+function uc_discount_clear_price_cache() {
+  cache_clear_all(NULL, 'cache_uc_price');
+}

