You are here

function bean_bean_cache_clear in Bean (for Drupal 7) 7

Implements hook_bean_cache_clear().

File

./bean.module, line 424
Block Entity

Code

function bean_bean_cache_clear() {

  // Clear static variables.
  drupal_static_reset('bean_access');
  drupal_static_reset('bean_get_types');
  drupal_static_reset('bean_get_all_beans');
  drupal_static_reset('bean_fetch_plugin_info');
  drupal_static_reset('bean_load_plugin_class');
  drupal_static_reset('bean_block_info');
  drupal_static_reset('bean_load_delta');

  // Flush caches.
  cache_clear_all('bean_plugins', 'cache');
  cache_clear_all('bean_block_info', 'cache');
  if (module_exists('block')) {
    cache_clear_all(NULL, 'cache_block');
  }
  cache_clear_all(NULL, 'cache_page');
}