function esi_esi_context in ESI: Edge Side Includes 7.3
Implements hook_esi_context().
File
- ./
esi.module, line 475 - Adds support for ESI (Edge-Side-Include) integration, allowing components\ to be delivered by ESI, with support for per-component cache times.
Code
function esi_esi_context($account) {
global $user;
return array(
// Add a role context.
'ROLE' => implode(',', array_keys($user->roles)),
// Add a user context (to match the primary session key).
'USER' => session_id(),
);
}