function cache_actions_rules_action_info in Cache Actions 6.2
Same name and namespace in other branches
- 6 cache_actions.rules.inc \cache_actions_rules_action_info()
- 7.2 cache_actions.rules.inc \cache_actions_rules_action_info()
- 7 cache_actions.rules.inc \cache_actions_rules_action_info()
Implementation of hook_rules_action_info().
File
- ./
cache_actions.rules.inc, line 11 - This file provides the rules integration for this module.
Code
function cache_actions_rules_action_info() {
// Actions that works for everyone
$actions = array(
'cache_actions_action_clear_cache' => array(
'label' => t('Clear cache bins'),
'arguments' => array(
'tables' => array(
'type' => 'value',
'label' => t('Cache tables'),
'description' => t('Specify which cache tables you want to clear here.
Separate the tables with spaces. You can use * to clear all tables'),
),
),
'module' => 'Cache Actions',
),
'cache_actions_action_clear_cache_cid' => array(
'label' => t('Clear a specific cache cid'),
'arguments' => array(
'table' => array(
'type' => 'value',
'label' => t('Cache tables'),
'description' => t('The cache table where the cid is'),
),
'cid' => array(
'type' => 'string',
'label' => t('Cache cid'),
'description' => t('The cid to clear'),
),
'wildcard' => array(
'type' => 'boolean',
'label' => t('Use wildcard'),
'description' => t('Use wildcards. This means you will be clearing
all cids that partially matches.'),
),
),
'module' => 'Cache Actions',
),
'cache_actions_action_clear_css_js_cache' => array(
'label' => t('Clear the css and js cache'),
'module' => 'Cache Actions',
),
);
// If the views module is available, then we can clear the cache of individual views.
if (module_exists('views')) {
$actions['cache_actions_action_clear_views_cache'] = array(
'label' => t('Clear the cache for specific views'),
'arguments' => array(
'view' => array(
'type' => 'value',
'label' => t('View'),
'description' => t('Specify the views you want to clear.'),
),
),
'module' => 'Cache Actions',
);
$actions['cache_actions_action_clear_views_display_cache'] = array(
'label' => t('Clear the cache for views displays'),
'arguments' => array(
'displays' => array(
'type' => 'value',
'label' => t('Displays'),
'description' => t('Select the displays you want to clear.'),
),
),
'module' => 'Cache Actions',
);
}
// If the page manager module is available, then we can clear the cache of panel pages.
if (module_exists('page_manager')) {
$actions['cache_actions_action_clear_panels_page_cache'] = array(
'label' => t('Clear the cache for panel page variants'),
'arguments' => array(
'panel' => array(
'type' => 'value',
'label' => t('Panel page'),
'description' => t('Specify the panel page you want to clear.'),
),
),
'module' => 'Cache Actions',
);
$actions['cache_actions_action_clear_panels_pane_cache'] = array(
'label' => t('Clear the cache for panel page panes'),
'arguments' => array(
'panel' => array(
'type' => 'value',
'label' => t('Panel page'),
'description' => t('Specify the panel page you want to clear.'),
),
'panes' => array(
'type' => 'value',
'label' => t('Panel page'),
'description' => t('The pane to clear'),
),
),
'module' => 'Cache Actions',
);
}
// If the mini panels module is available, then we can clear the cache of mini panels.
if (module_exists('panels_mini')) {
$actions['cache_actions_action_clear_panels_mini_cache'] = array(
'label' => t('Clear the cache for a specific mini panel variants'),
'arguments' => array(
'panel' => array(
'type' => 'value',
'label' => t('Panel page'),
'description' => t('Specify the mini panel you want to clear.'),
),
),
'module' => 'Cache Actions',
);
$actions['cache_actions_action_clear_panels_mini_pane_cache'] = array(
'label' => t('Clear the cache for mini panel panes'),
'arguments' => array(
'panel' => array(
'type' => 'value',
'label' => t('Panel page'),
'description' => t('Specify the mini panel you want to clear.'),
),
'panes' => array(
'type' => 'string',
'label' => t('Panel panes'),
'description' => t('Specify the mini panes you want to clear.'),
),
),
'module' => 'Cache Actions',
);
}
// If varnish module is available, then we can clear specific varnish pages.
if (module_exists('varnish')) {
$actions['cache_actions_action_clear_varnish_page'] = array(
'label' => t('Clear paths cached in varnish'),
'arguments' => array(
'paths' => array(
'type' => 'string',
'label' => t('Varnish paths'),
'description' => t('The cached paths'),
),
),
'module' => 'Cache Actions',
);
$actions['cache_actions_action_clear_varnish_cache'] = array(
'label' => t('Clear all paths cached in varnish for this site'),
'module' => 'Cache Actions',
);
}
return $actions;
}