You are here

function apc_form_system_performance_settings_alter in APC - Alternative PHP Cache 7

Implements hook_form_FORM_ID_alter().

File

./apc.module, line 130
This integrates the drupal APC cache module.

Code

function apc_form_system_performance_settings_alter(&$form, $form_state) {
  $form['clear_cache']['clear']['#submit'][] = 'apc_clear_user_cache';
  $form['clear_cache']['clear']['#submit'][] = 'apc_clear_opcode_cache';
  $form['clear_cache']['apc_user'] = array(
    '#type' => 'submit',
    '#value' => t('Clear APC user cache'),
    '#submit' => array(
      'apc_clear_user_cache',
    ),
  );
  if (!extension_loaded('apcu')) {
    $form['clear_cache']['apc_opcode'] = array(
      '#type' => 'submit',
      '#value' => t('Clear APC opcode cache'),
      '#submit' => array(
        'apc_clear_opcode_cache',
      ),
    );
  }
}