function hook_acquia_purge_variations_alter in Acquia Purge 7
Edit/extend the list of variations for $path.
When the site has variations enabled, administrators will automatically see their manual purge attempts getting more purged than they asked for, which happens to aid them in wiping absolutely everything they wanted cleaned. For instance editors on your site always want to get the RSS feed refreshed when they wipe the 'news' page, which you can easily tweak for them with this hook.
Parameters
string $path: The Drupal path (for example: '<front>', 'user/1' or a alias).
string[] $variations: All the variations that have been made up as possible other incarnations of the page that needs a manual wipe. You can delete items as well as adding new ones, as long as they are path sections (and NOT full urls!) on which Acquia Purge can perform Varnish purges thereafter.
See also
_acquia_purge_input_path_variations()
1 invocation of hook_acquia_purge_variations_alter()
- _acquia_purge_input_path_variations in ./
acquia_purge.module - Make up variations on the given paths for lazier administrative cleaning.
File
- ./
acquia_purge.api.php, line 128 - Hooks provided by the Acquia Purge module.
Code
function hook_acquia_purge_variations_alter($path, array &$variations) {
if (in_array($path, array(
'<front>',
'',
'/',
))) {
$variations[] = 'rss.xml';
}
if ($path === 'news') {
$variations[] = 'news/feed';
}
}