performance_clear_apc_confirm_submit

Versions
mediamosa-21
performance_clear_apc_confirm_submit($form_id, &$form)

Code

sites/all/modules/devel/performance/performance.module, line 534

<?php
function performance_clear_apc_confirm_submit($form_id, &$form) {
  if (!function_exists('apc_cache_info')) {
    drupal_set_message(t('APC is not enabled. Nothing to do ...'), 'status', FALSE);
    drupal_goto('admin/config/development/performance');
    return;
  }

  $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.'), 'status', FALSE);
  drupal_goto('admin/config/development/performance');
}
?>