You are here

function hook_authcache_key_properties_alter in Authenticated User Page Caching (Authcache) 7.2

Modify the properties used to calculate the authcache key.

See also

authcache_key_properties()

authcache_key()

1 function implements hook_authcache_key_properties_alter()

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

authcache_test_authcache_key_properties_alter in tests/authcache_test.module
Implements hook_authcache_key_properties_alter().
1 invocation of hook_authcache_key_properties_alter()
authcache_key_properties in ./authcache.module
Return key-properties.

File

./authcache.api.php, line 151
Authcache API documentation.

Code

function hook_authcache_key_properties_alter(&$properties) {
  global $user;

  // Paranoia-mode: Make sure the authcache-key for logged in users changes
  // every hour.
  if ($user->uid) {
    $properties['timeslice'] = floor(REQUEST_TIME / 3600);
  }
}