You are here

function _glossary_clear_cache in Glossary 7

Same name and namespace in other branches
  1. 5.2 glossary.module \_glossary_clear_cache()
  2. 5 glossary.module \_glossary_clear_cache()
  3. 6 glossary.module \_glossary_clear_cache()
2 calls to _glossary_clear_cache()
glossary_filter_form_submit in ./glossary.admin.inc
This is filter for submit handler. @todo Please document this function.
glossary_taxonomy in ./glossary.module
Implements hook_taxonomy().

File

./glossary.module, line 1268
Glossary terms will be automatically marked with links to their descriptions.

Code

function _glossary_clear_cache($format = NULL) {

  // We could throw fewer things away if we checked which filter formats
  // used the glossary filter, and we only threw those away. In practice,
  // most if not all formats would use the glossary filter, so we just
  // get rid of them all.
  if (!is_array($format)) {
    $wildcard = $format . ':';
  }
  if (empty($wildcard)) {
    $wildcard = '*';
  }
  cache_clear_all($wildcard, 'cache_filter', TRUE);
  drupal_set_message(t('The filter cache has been cleared. There may be a temporary performance degradation while it is rebuilt.'));
}