function apachesolr_clear_cache in Apache Solr Search 6
Same name and namespace in other branches
- 8 apachesolr.module \apachesolr_clear_cache()
- 6.3 apachesolr.module \apachesolr_clear_cache()
- 6.2 apachesolr.module \apachesolr_clear_cache()
- 7 apachesolr.module \apachesolr_clear_cache()
A wrapper for cache_clear_all to be used as a submit handler on forms that require clearing Luke cache etc.
1 call to apachesolr_clear_cache()
- apachesolr_enabled_facets_form_submit in ./
apachesolr.admin.inc - This is the submit handler for the active facets form.
3 string references to 'apachesolr_clear_cache'
- apachesolr_form_content_field_edit_form_alter in ./
apachesolr.module - Implementation of hook_form_[form_id]_alter().
- apachesolr_form_content_field_overview_form_alter in ./
apachesolr.module - Implementation of hook_form_[form_id]_alter().
- apachesolr_form_node_type_form_alter in ./
apachesolr.module - Implementation of hook_form_[form_id]_alter().
File
- ./
apachesolr.module, line 583 - Integration with the Apache Solr search application.
Code
function apachesolr_clear_cache() {
try {
$solr = apachesolr_get_solr();
$solr
->clearCache();
} catch (Exception $e) {
watchdog('Apache Solr', nl2br(check_plain($e
->getMessage())), NULL, WATCHDOG_ERROR);
drupal_set_message(nl2br(check_plain($e
->getMessage())), 'warning');
}
}