You are here

function _authcache_debug_shutdown in Authenticated User Page Caching (Authcache) 7.2

Shutdown function for saving debug info.

1 string reference to '_authcache_debug_shutdown'
authcache_debug_init in modules/authcache_debug/authcache_debug.module
Implements hook_authcache_cache_data_alter().

File

modules/authcache_debug/authcache_debug.module, line 121
Debug widget for Authcache.

Code

function _authcache_debug_shutdown() {
  $debuginfo = module_invoke_all('authcache_debug_info');
  drupal_alter('authcache_debug_info', $debuginfo);
  $messages = authcache_debug_log();
  if (!empty($messages)) {
    $debuginfo['messages'] = $messages;
  }
  $cid = _authcache_debug_cid();
  $lifetime = variable_get('authcache_debug_cache_lifetime', 0);
  $expire = $lifetime > 0 ? REQUEST_TIME + $lifetime : CACHE_TEMPORARY;
  cache_set($cid, $debuginfo, 'cache_authcache_debug', $expire);
}