You are here

function authcache_account_allows_caching in Authenticated User Page Caching (Authcache) 7.2

Return true if the given account is cacheable.

Related topics

7 calls to authcache_account_allows_caching()
authcache_builtin_authcache_backend_key_set in modules/authcache_builtin/authcache_builtin.module
Implements hook_authcache_backend_key_set().
authcache_esi_debug_status_table in modules/authcache_esi/authcache_esi_debug.module
Ajax callback: List test results of manual ESI test.
authcache_form_alter in ./authcache.module
Implements hook_form_alter().
authcache_usercookie_authcache_cookie in examples/authcache_usercookie/authcache_usercookie.module
Implements hook_authcache_cookie().
authcache_varnish_get_key in modules/authcache_varnish/authcache_varnish.module
Menu callback for varnish cache server.

... See full list

File

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

Code

function authcache_account_allows_caching($account = NULL) {
  global $user;
  $cacheable =& drupal_static(__FUNCTION__);
  if (!isset($account)) {
    $account = $user;
  }
  if (!isset($cacheable[$account->uid])) {
    $reasons = module_invoke_all('authcache_account_exclude', $account);
    $cacheable[$account->uid] = empty($reasons);
  }
  return $cacheable[$account->uid];
}