You are here

function hook_authcache_cancel in Authenticated User Page Caching (Authcache) 7.2

Perform last-minute checks before a built page is saved to the cache.

Return value

string A translated string specifying the reason for cancelation or null.

See also

authcache_page_set_cache()

2 functions implement hook_authcache_cancel()

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

authcache_authcache_cancel in ./authcache.module
Implements hook_authcache_cancel().
authcache_test_authcache_cancel in tests/authcache_test.module
Implements hook_authcache_cancel().
1 invocation of hook_authcache_cancel()
authcache_exit in ./authcache.module
Implements hook_exit().

File

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

Code

function hook_authcache_cancel() {

  // Make sure "Location" redirect isn't used.
  foreach (headers_list() as $header) {
    if (strpos($header, 'Location:') === 0) {
      return t('Location header detected');
    }
  }
}