diff --git a/includes/rules.core.inc b/includes/rules.core.inc
index 6f87e95..7d96114 100644
--- a/includes/rules.core.inc
+++ b/includes/rules.core.inc
@@ -1132,6 +1132,12 @@ abstract class RulesPlugin extends RulesExtendable {
       }
       $this->ensureNameExists();
       $this->data = $this;
+      // Load the stored entity, if any, to use it for variable comparison in
+      // the cache clearing logic below.
+      if (!isset($this->original) && !empty($this->id)) {
+        $this->original = entity_load_unchanged('rules_config', $this->id);
+      }
+      $original = isset($this->original) ? $this->original : NULL;
       $return = entity_get_controller('rules_config')->save($this);
       unset($this->data);
 
@@ -1144,11 +1150,11 @@ abstract class RulesPlugin extends RulesExtendable {
         if (!empty($plugin_info['component'])) {
           // When component variables changes rebuild the complete cache so the
           // changes to the provided action/condition take affect.
-          if (empty($this->original) || $this->componentVariables() != $this->original->componentVariables()) {
+          if (empty($original) || $this->componentVariables() != $original->componentVariables()) {
             rules_clear_cache();
           }
           // Clear components cached for evaluation.
-          cache_clear_all('comp_', 'cache_rules', TRUE);
+          cache_clear_all('comp_' . $this->name, 'cache_rules', TRUE);
         }
         elseif ($this->plugin == 'reaction rule') {
           // Clear event sets cached for evaluation.
diff --git a/rules.module b/rules.module
index d2ff900..699d987 100644
--- a/rules.module
+++ b/rules.module
@@ -326,7 +326,7 @@ function &rules_get_cache($cid = 'data') {
     }
     elseif (strpos($cid, 'comp_') === 0) {
       $cache[$cid] = FALSE;
-      _rules_rebuild_component_cache();
+      _rules_rebuild_component_cache($cid);
     }
     elseif (strpos($cid, 'event_') === 0) {
       $cache[$cid] = FALSE;
@@ -371,23 +371,33 @@ function _rules_rebuild_cache(&$cache) {
  *
  * @see rules_invoke_component()
  * @see rules_get_cache()
+ *
+ * @param string $cid
+ *   The cid of a specific component to re-build.
  */
-function _rules_rebuild_component_cache() {
+function _rules_rebuild_component_cache($cid = NULL) {
   $components = rules_get_components();
 
+  // If a specific cid was requested but it doesn't exist build the whole cache.
+  if (!empty($cid) && !isset($components[str_replace('comp_', '', $cid)])) {
+    $cid = NULL;
+  }
+
   foreach ($components as $id => $component) {
-    // If a component is marked as dirty, check if this still applies.
-    if ($component->dirty) {
-      rules_config_update_dirty_flag($component);
-    }
-    if (!$component->dirty) {
-      // Clone the component to avoid modules getting the to be cached
-      // version from the static loading cache.
-      $component = clone $component;
-      $component->optimize();
-      // Allow modules to alter the cached component.
-      drupal_alter('rules_component', $component->plugin, $component);
-      rules_set_cache('comp_' . $component->name, $component);
+    if (empty($cid) || $cid == 'comp_' . $id) {
+      // If a component is marked as dirty, check if this still applies.
+      if ($component->dirty) {
+        rules_config_update_dirty_flag($component);
+      }
+      if (!$component->dirty) {
+        // Clone the component to avoid modules getting the to be cached
+        // version from the static loading cache.
+        $component = clone $component;
+        $component->optimize();
+        // Allow modules to alter the cached component.
+        drupal_alter('rules_component', $component->plugin, $component);
+        rules_set_cache('comp_' . $component->name, $component);
+      }
     }
   }
 }
