You are here

function hook_authcache_canceled in Authenticated User Page Caching (Authcache) 7.2

Perform an action when page caching has been canceled.

This hook may be called very late, i.e. after the page was built und just before it is sent to the browser.

Parameters

string $reason: A translated string giving the reason why page caching has been canceled.

See also

authcache_cancel()

3 functions implement hook_authcache_canceled()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

authcache_debug_authcache_canceled in modules/authcache_debug/authcache_debug.module
Implements hook_authcache_canceled().
authcache_form_test_authcache_canceled in modules/authcache_form/tests/authcache_form_test.module
Implements hook_authcache_canceled().
authcache_test_authcache_canceled in tests/authcache_test.module
Implements hook_authcache_canceled().
1 invocation of hook_authcache_canceled()
authcache_cancel in ./authcache.module
Prevent this page of beeing stored in the cache after it is built up.

File

./authcache.api.php, line 78
Authcache API documentation.

Code

function hook_authcache_canceled($reason) {
  if (authcache_debug_access()) {
    setcookie('nocache_reason', $reason, 0, ini_get('session.cookie_path'), ini_get('session.cookie_domain'), ini_get('session.cookie_secure') == '1');
  }
}