You are here

function authcache_process_page in Authenticated User Page Caching (Authcache) 7

Same name and namespace in other branches
  1. 7.2 authcache.module \authcache_process_page()

Implements hook_process_HOOK().

Prevent caching pages with status messages on them. Note that due to the fact the messages are only added in template_process_page, we also need to use the process-hook.

File

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

Code

function authcache_process_page(&$variables) {
  global $_authcache_is_cacheable, $_authcache_info;
  if (!empty($variables['messages']) && $_authcache_is_cacheable) {
    $_authcache_is_cacheable = $variables['authcache_is_cacheable'] = FALSE;
    $_authcache_info['no_cache_reason'] = 'Status message displayed.';
  }
}