function hook_expire_urls_alter in Cache Expiration 7.2
Provides possibility to change urls right before they are expired.
Parameters
$urls: List of internal paths and/or absolute URLs that should be flushed.
Example of array (when base url include option is enabled): array( 'node/1' => 'http://example.com/node/1', 'news' => 'http://example.com/news', );
Example of array (when base url include option is disabled): array( 'node/1' => 'node/1', 'news' => 'news', );
$object_type: Name of object type ('node', 'comment', 'user', etc).
$object: Object (node, comment, user, etc) for which expiration is executes.
See also
1 invocation of hook_expire_urls_alter()
- ExpireAPI::executeExpiration in includes/
expire.api.inc - Executes internal or external cache expiration.
File
- ./
expire.api.php, line 108 - API documentation for Cache Expiration module.
Code
function hook_expire_urls_alter(&$urls, $object_type, $object) {
if ($object_type == 'node' && isset($urls['node-' . $object->nid])) {
$urls['node-' . $object->nid] = 'custom-url';
}
}