You are here

function apc_init in APC - Alternative PHP Cache 7

Implementation of hook_init().

Used for displaying the APC stats for debug purposes.

File

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

Code

function apc_init() {
  global $user;
  if ($user->uid == 0 || !variable_get('apc_show_debug', FALSE) || !user_access('access apc statistics') || strstr($_SERVER['PHP_SELF'], 'update.php') || strstr($_GET['q'], 'autocomplete')) {
    return;
  }
  register_shutdown_function('apc_shutdown');
}