Skip to content

Commit

Permalink
Issue #236: Add the ability to flush the Rules cache to the admin bar.
Browse files Browse the repository at this point in the history
  • Loading branch information
bugfolder committed May 18, 2024
1 parent c7d1e8e commit 649aedf
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 649aedf

Please sign in to comment.