You are here

function cache_actions_get_cache_bins in Cache Actions 7.2

Get all cache bins available.

2 calls to cache_actions_get_cache_bins()
cache_actions_action_clear_cache in ./cache_actions.rules.inc
This action that clears all cache bins specified.
cache_actions_cache_bins_reset in ./cache_actions.module
Reset the variable that stores the current available cache bins.
3 string references to 'cache_actions_get_cache_bins'
cache_actions_cache_bins_reset in ./cache_actions.module
Reset the variable that stores the current available cache bins.
cache_actions_rules_action_info in ./cache_actions.rules.inc
Implements hook_rules_action_info().
cache_actions_uninstall in ./cache_actions.install
Implements hook_uninstall().

File

./cache_actions.module, line 73
This is the module file. It contains hooks for panels and views.

Code

function cache_actions_get_cache_bins() {
  $cache_bins = variable_get('cache_actions_get_cache_bins', FALSE);

  // Check if the cache bins were already detected and stored.
  if (empty($cache_bins)) {
    $cache_bins = array(
      'cache' => 'cache',
      'cache_block' => 'cache_block',
      'cache_filter' => 'cache_filter',
      'cache_page' => 'cache_page',
    );
    foreach (module_invoke_all('flush_caches') as $cache_bin) {
      $cache_bins[$cache_bin] = $cache_bin;
    }

    // Store the found cache bins.
    variable_set('cache_actions_get_cache_bins', $cache_bins);
  }
  return $cache_bins;
}