diff --git a/includes/rules.core.inc b/includes/rules.core.inc
index f2690fe..6783ca7 100644
--- a/includes/rules.core.inc
+++ b/includes/rules.core.inc
@@ -1049,7 +1049,7 @@ abstract class RulesPlugin extends RulesExtendable {
         elseif ($this->plugin == 'reaction rule') {
           // Clear event sets cached for evaluation.
           cache_clear_all('event_', 'cache_rules', TRUE);
-          variable_del('rules_empty_sets');
+          rules_empty_sets(NULL, TRUE);
         }
         drupal_static_reset('rules_get_cache');
         drupal_static_reset('rules_config_update_dirty_flag');
diff --git a/includes/rules.plugins.inc b/includes/rules.plugins.inc
index 2a4fa51..9365840 100644
--- a/includes/rules.plugins.inc
+++ b/includes/rules.plugins.inc
@@ -748,7 +748,7 @@ class RulesEventSet extends RulesRuleSet {
     // Cache a list of empty sets so we can use it to speed up later calls.
     // See rules_get_event_set().
     $empty_events = array_keys(array_diff_key($events, $sets));
-    variable_set('rules_empty_sets', array_flip($empty_events));
+    rules_empty_sets(array_flip($empty_events));
   }
 
   protected function stateVariables($element = NULL) {
diff --git a/rules.install b/rules.install
index ce72c81..7c4b8cd 100644
--- a/rules.install
+++ b/rules.install
@@ -18,7 +18,6 @@ function rules_install() {
  * Implements hook_uninstall().
  */
 function rules_uninstall() {
-  variable_del('rules_empty_sets');
   variable_del('rules_debug');
 }
 
@@ -434,3 +433,10 @@ function rules_update_7209() {
     'description' => 'Whether to use a permission to control access for using components.',
   ));
 }
+
+/**
+ * Deletes the unused rules_empty_sets variable.
+ */
+function rules_update_7210() {
+  variable_del('rules_empty_sets');
+}
diff --git a/rules.module b/rules.module
index daa0faa..bdd4b1d 100644
--- a/rules.module
+++ b/rules.module
@@ -337,7 +337,7 @@ function rules_set_cache($cid, $data) {
  * Implements hook_flush_caches().
  */
 function rules_flush_caches() {
-  variable_del('rules_empty_sets');
+  rules_empty_sets(NULL, TRUE);
   return array('cache_rules');
 }
 
@@ -346,7 +346,7 @@ function rules_flush_caches() {
  */
 function rules_clear_cache() {
   cache_clear_all('*', 'cache_rules', TRUE);
-  variable_del('rules_empty_sets');
+  rules_empty_sets(NULL, TRUE);
   drupal_static_reset('rules_get_cache');
   drupal_static_reset('rules_fetch_data');
   drupal_static_reset('rules_config_update_dirty_flag');
@@ -354,6 +354,42 @@ function rules_clear_cache() {
 }
 
 /**
+ * Maintains a cache of empty rules sets.
+ *
+ * @param array $set_value
+ *   An array of empty rules sets. If passed both the static and persistent
+ *   caches will be updated to the new value.
+ * @param boolean $delete
+ *   If true, the empty rules sets static cache will be reset and the persistent
+ *   cache entry will be cleared.
+ *
+ * @return
+ *   An array of empty rules sets.
+ */
+function rules_empty_sets($set_value = NULL, $delete = FALSE) {
+  $empty_sets = &drupal_static(__FUNCTION__);
+
+  if ($delete) {
+    drupal_static_reset(__FUNCTION__);
+    cache_clear_all('rules_empty_sets', 'cache_rules');
+    return;
+  }
+
+  if (isset($set_value)) {
+    $empty_sets = $set_value;
+    cache_set('rules_empty_sets', $set_value, 'cache_rules');
+  }
+
+  if (!isset($empty_sets)) {
+    $empty_sets = array();
+    if ($cached = cache_get('rules_empty_sets', 'cache_rules')) {
+      $empty_sets = $cached->data;
+    }
+  }
+  return $empty_sets;
+}
+
+/**
  * Imports the given export and returns the imported configuration.
  *
  * @param $export
@@ -822,14 +858,14 @@ function rules_invoke_all() {
  * @see rules_invoke_event_by_args()
  */
 function rules_invoke_event() {
-  global $conf;
-
   $args = func_get_args();
   $event_name = $args[0];
   unset($args[0]);
+  $empty_sets = rules_empty_sets();
+
   // For invoking the rules event we directly acccess the global $conf. This is
   // fast without having to introduce another static cache.
-  if (!defined('MAINTENANCE_MODE') && !isset($conf['rules_empty_sets'][$event_name]) && $event = rules_get_cache('event_' . $event_name)) {
+  if (!defined('MAINTENANCE_MODE') && !isset($empty_sets[$event_name]) && $event = rules_get_cache('event_' . $event_name)) {
     $event->executeByArgs($args);
   }
 }
@@ -852,11 +888,11 @@ function rules_invoke_event() {
  * @see rules_invoke_event()
  */
 function rules_invoke_event_by_args($event_name, $args = array()) {
-  global $conf;
+  $empty_sets = rules_empty_sets();
 
   // For invoking the rules event we directly acccess the global $conf. This is
   // fast without having to introduce another static cache.
-  if (!defined('MAINTENANCE_MODE') && !isset($conf['rules_empty_sets'][$event_name]) && $event = rules_get_cache('event_' . $event_name)) {
+  if (!defined('MAINTENANCE_MODE') && !isset($empty_sets[$event_name]) && $event = rules_get_cache('event_' . $event_name)) {
     $event->executeByArgs($args);
   }
 }
