function performance_clear_apc_confirm_submit in Devel 5
File
- performance/
performance.module, line 492
Code
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 ...'));
drupal_goto('admin/settings/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.'));
drupal_goto('admin/settings/performance');
}