function apc_shutdown

cis7 apc.module apc_shutdown()
cle7 apc.module apc_shutdown()
elmsmedia7 apc.module apc_shutdown()
icor7 apc.module apc_shutdown()
meedjum_blog7 apc.module apc_shutdown()
mooc7 apc.module apc_shutdown()

See apc_init() which registers this function as a shutdown function. Displays apc stats in the footer.

1 string reference to 'apc_shutdown'
apc_init in sites/all/modules/ulmus/apc/apc.module
Implementation of hook_init().

File

sites/all/modules/ulmus/apc/apc.module, line 53
This integrates the drupal APC cache module.

Code

function apc_shutdown() {
  global $apc_statistics;

  // Don't call theme() during shutdown if the registry has been rebuilt (such
  // as when enabling/disabling modules on admin/build/modules) as things break.
  // Instead, simply exit without displaying admin statistics for this page
  // load.  See http://drupal.org/node/616282 for discussion.
  if (!function_exists('theme_get_registry') || !theme_get_registry()) {
    return;
  }

  // Try not to break non-HTML pages.
  if (function_exists('drupal_get_http_header')) {
    $header = drupal_get_http_header('content-type');
    if ($header) {
      $formats = array(
        'xml',
        'javascript',
        'json',
        'plain',
        'image',
        'application',
        'csv',
        'x-comma-separated-values',
      );
      foreach ($formats as $format) {
        if (strstr($header, $format)) {
          return;
        }
      }
    }
  }

  if (isset($apc_statistics) && is_array($apc_statistics)) {
    print '<div id="apc-devel"><h2>' . t('APC statistics') . '</h2>';
    $rows = array();

    foreach ($apc_statistics as $row) {
      if (is_array($row[2])) {
        $row[2] = implode(',<br />', $row[2]);
      }
      $rows[] = $row;
    }
    print theme('table', array(
      'header' => array(('Type'), t('Bin'), t('Cid(s)')),
      'rows' => $rows,
    ));
    print '</div>';
  }
}