You are here

function authcache_backend_anonymous_key in Authenticated User Page Caching (Authcache) 7.2

Return the key suitable for this request if no session is open.

Related topics

8 calls to authcache_backend_anonymous_key()
AuthcacheBackendKeyManagementTestCase::testKeyRenewDuringLogin in tests/authcache.backend.test
Call hook_authcache_backend_key_set during login and logout.
AuthcacheBackendKeyManagementTestCase::testKeyRenewDuringLogout in tests/authcache.backend.test
Call hook_authcache_backend_key_set during logout.
AuthcacheBackendKeyManagementTestCase::testNoKeyRenewWhenKeyDoesNotChange in tests/authcache.backend.test
Do not call hook_authcache_backend_key_set when key remains the same.
AuthcacheBuiltinTestCacheBackend::testKeyExpiry in modules/authcache_builtin/tests/authcache_builtin.cache-backend.test
Verify that the key cache is set with the proper values.
AuthcacheBuiltinTestCacheBackend::testKeyLoginLogout in modules/authcache_builtin/tests/authcache_builtin.cache-backend.test
Verify that the key cache is set with the proper values.

... See full list

File

./authcache.cache.inc, line 201
Defines authcache aware copy of drupal_serve_page_from_cache().

Code

function authcache_backend_anonymous_key() {
  global $base_root;
  $generator = variable_get('authcache_key_generator');
  if (is_callable($generator)) {
    $key = call_user_func($generator);
  }
  else {
    $key = $base_root;
  }
  return $key;
}