You are here

function noreferrer_flush_caches in No Referrer 7

Purges caches using the No Referrer filter.

1 string reference to 'noreferrer_flush_caches'
noreferrer_admin_submit in ./noreferrer.admin.inc
Admin settings submit handler.

File

./noreferrer.admin.inc, line 81
Admin settings callbacks for no referrer module.

Code

function noreferrer_flush_caches() {
  $formats = db_select('filter')
    ->fields('filter', array(
    'format',
  ))
    ->condition('name', 'noreferrer')
    ->execute();
  foreach ($formats as $key => $format) {
    cache_clear_all($format->format . ':', 'cache_filter', TRUE);
    if (!$key) {
      cache_clear_all('*', 'cache_field', TRUE);
    }
  }
}