public function Drupal_Apache_Solr_Service::clearCache in Apache Solr Search 5.2
Same name and namespace in other branches
- 6 Drupal_Apache_Solr_Service.php \Drupal_Apache_Solr_Service::clearCache()
- 6.2 Drupal_Apache_Solr_Service.php \Drupal_Apache_Solr_Service::clearCache()
Clear cached Solr data.
File
- ./
Drupal_Apache_Solr_Service.php, line 158
Class
Code
public function clearCache() {
// Don't clear cached data if the server is unavailable.
if (@$this
->ping()) {
$this
->_clearCache();
}
else {
throw new Exception('No Solr instance available when trying to clear the cache.');
}
}