You are here

function hook_authcache_menu_invariant_access_callbacks in Authenticated User Page Caching (Authcache) 7.2

Return invariant menu access callbacks.

Declare a list of menu access callbacks which are guaranteed to return the same result for each user having the same set of roles. By comparing this access callback whitelist with the entries from the menu_router table, a list of tab root paths is derived. When a page is rendered, its tab root is looked up in the tab root blacklist. If a matching entry is found this means that the set of displayed tabs is not guaranteed to be the same for all users with the same authcache key. Therefore tabs need to be loaded using a personalization fragment (i.e. using Ajax or ESI).

2 functions implement hook_authcache_menu_invariant_access_callbacks()

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

authcache_menu_authcache_menu_invariant_access_callbacks in modules/authcache_menu/authcache_menu.module
Implements hook_authcache_menu_invariant_access_callbacks().
authcache_menu_test_authcache_menu_invariant_access_callbacks in modules/authcache_menu/tests/authcache_menu_test.module
Implements hook_authcache_menu_invariant_access_callbacks().
1 invocation of hook_authcache_menu_invariant_access_callbacks()
_authcache_menu_tab_root_type_map_load in modules/authcache_menu/authcache_menu.module
Utility function: Load map of tab_roots -> type.

File

modules/authcache_menu/authcache_menu.api.php, line 19
API documentation for Authcache Menu hooks.

Code

function hook_authcache_menu_invariant_access_callbacks() {
  return array(
    '0',
    '1',
    'user_access',
    'user_is_anonymous',
    'user_is_logged_in',
    'user_register_access',
    'search_is_active',
  );
}