Bug 23137: Move cache flushing to the method
[koha.git] / misc / search_tools / rebuild_elasticsearch.pl
index 5268d12..6cff2ea 100755 (executable)
@@ -112,7 +112,6 @@ use Koha::MetadataRecord::Authority;
 use Koha::BiblioUtils;
 use Koha::SearchEngine::Elasticsearch;
 use Koha::SearchEngine::Elasticsearch::Indexer;
-use Koha::Caches;
 use MARC::Field;
 use MARC::Record;
 use Modern::Perl;
@@ -156,9 +155,6 @@ _sanity_check();
 
 if ($reset){
     Koha::SearchEngine::Elasticsearch->reset_elasticsearch_mappings;
-    my $cache = Koha::Caches->get_instance();
-    $cache->clear_from_cache('elasticsearch_search_fields_staff_client');
-    $cache->clear_from_cache('elasticsearch_search_fields_opac');
     $delete = 1;
 }