You are here

function performance_clear_apc_confirm_submit in Performance Logging and Monitoring 5

File

./performance.module, line 534

Code

function performance_clear_apc_confirm_submit($form_id, &$form) {
  $list = performance_apc_list_all();
  if (!count($list)) {

    // Nothing stored yet
    return;
  }
  foreach ($list as $key) {
    if ($data = apc_fetch($key)) {
      apc_delete($key);
    }
  }
  drupal_set_message(t('Performance statistics collected in APC has been cleared.'));
  drupal_goto('admin/settings/performance');
}