You are here

function authcache_exit in Authenticated User Page Caching (Authcache) 6

Same name and namespace in other branches
  1. 7.2 authcache.module \authcache_exit()
  2. 7 authcache.module \authcache_exit()

Implements hook_exit().

Called on drupal_goto() redirect. Make sure status messages show up, if applicable.

File

./authcache.module, line 450
Authenticated User Page Caching (and anonymous users, too!)

Code

function authcache_exit($destination = NULL) {
  global $is_page_authcache;
  if ($destination !== NULL) {
    $is_page_authcache = FALSE;

    // Cookie will inform Authcache not to display cached page on next request
    if (drupal_set_message()) {
      setcookie('nocache', 1, 0, ini_get('session.cookie_path'), ini_get('session.cookie_domain'), ini_get('session.cookie_secure') == '1');
      setcookie('nocache_temp', 1, 0, ini_get('session.cookie_path'), ini_get('session.cookie_domain'), ini_get('session.cookie_secure') == '1');
    }
  }
}