*/ /** * Implementation of hook_user * * When logged in you don't want to hit the page_fast_cache or else you will serve * a cached page to a logged in user. */ function cacherouter_user($op, &$edit, &$account, $category = NULL) { if (!variable_get('page_cache_fastpath', TRUE)) { return; } switch ($op) { case 'login': setcookie('cacherouter', TRUE, time() + (60 * 60 * 24 * 30), '/'); break; case 'logout': //Set in past to delete cookie setcookie('cacherouter', TRUE, time() - 3600, '/'); break; } } function cacherouter_menu() { $items = array(); $items['admin/settings/cacherouter'] = array( 'title' => t('CacheRouter Admin'), 'description' => t("View CacheRouter Usage Information."), 'page callback' => 'cacherouter_admin_stats_page', 'page arguments' => array(3), 'access arguments' => array('view cacherouter stats'), 'file' => 'cacherouter.admin.inc', ); return $items; } function cacherouter_perm() { return array('view cacherouter stats'); }