function campaignmonitor_clear_cache_submit in Campaign Monitor 8
Same name and namespace in other branches
- 6.3 includes/campaignmonitor.admin.inc \campaignmonitor_clear_cache_submit()
- 7 includes/campaignmonitor.admin.inc \campaignmonitor_clear_cache_submit()
Clear the caches used by Campaign Monitor.
2 string references to 'campaignmonitor_clear_cache_submit'
- CampaignMonitorAdminForm::buildForm in src/
Form/ CampaignMonitorAdminForm.php - Form constructor.
- campaignmonitor_admin_settings_general in includes/
campaignmonitor.admin.inc - Creates the Campaign Monitor settings form. This is located under the general tab.
File
- includes/
campaignmonitor.admin.inc, line 143 - Implementation of the administration interface for the module.
Code
function campaignmonitor_clear_cache_submit($form, &$form_state) {
CampaignMonitor::getConnector($form_state['values']['campaignmonitor_account']['api_key'], $form_state['values']['campaignmonitor_account']['client_id'])
->clearCache();
drupal_set_message(t('Campaign Monitor cache cleared.'), 'status');
// Rehash blocks, thereby rebuilding the DB block cache.
_block_rehash();
}