function hook_authcache_p13n_client_order_alter in Authenticated User Page Caching (Authcache) 7.2
Change the order of client methods for a given operation.
Parameters
array &$clients: Associative array of client records indexed by client-id. Each record is an array with key-value pairs. Assign an integer value to the weight key to influence the client order.
string $type: One of "fragment", "setting" or "assembly".
string $id: The fragment id (e.g., "form").
string $param: The parameter for the personalization operation.
See also
authcache_p13n_client_get_preferred()
1 function implements hook_authcache_p13n_client_order_alter()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- authcache_p13n_test_authcache_p13n_client_order_alter in modules/
authcache_p13n/ tests/ authcache_p13n_test.module - Implements hook_authcache_p13n_client_order_alter().
1 invocation of hook_authcache_p13n_client_order_alter()
- authcache_p13n_client_get_preferred in modules/
authcache_p13n/ authcache_p13n.module - Return the preferred client for the given fragment/assembly/setting.
File
- modules/
authcache_p13n/ authcache_p13n.api.php, line 246 - Documentation for hooks provided by the authcache personalization module.
Code
function hook_authcache_p13n_client_order_alter(&$clients, $type, $id, $param) {
if ($type === 'fragment' && $id === 'form') {
// Prefer esi over ajax for form-token retrieval.
$clients['authcache_esi']['weight'] = -99;
$clients['authcache_ajax']['weight'] = 0;
}
}