Skip to content

Commit

Permalink
Merge pull request #237 from bugfolder/236_flush_rules_cache
Browse files Browse the repository at this point in the history
Issue #236: Add the ability to flush the Rules cache to the admin bar.
  • Loading branch information
argiepiano authored Jun 5, 2024
2 parents c7d1e8e + 649aedf commit f51b9ba
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions rules.module
Original file line number Diff line number Diff line change
Expand Up @@ -530,6 +530,17 @@ function rules_clear_cache() {
entity_get_controller('rules_config')->resetCache();
}

/**
* Implements hook_admin_bar_cache_info().
*/
function rules_admin_bar_cache_info() {
$caches['rules'] = array(
'title' => t('Rules'),
'callback' => 'rules_clear_cache',
);
return $caches;
}

/**
* Imports the given export and returns the imported configuration.
*
Expand Down

0 comments on commit f51b9ba

Please sign in to comment.