Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
}
my $cache = Koha::Caches->get_instance();
- $cache->clear_from_cache('elasticsearch_search_fields_staff_client');
- $cache->clear_from_cache('elasticsearch_search_fields_opac');
+ $cache->clear_from_cache('elasticsearch_search_fields_staff_client_biblios');
+ $cache->clear_from_cache('elasticsearch_search_fields_opac_biblios');
+ $cache->clear_from_cache('elasticsearch_search_fields_staff_client_authorities');
+ $cache->clear_from_cache('elasticsearch_search_fields_opac_authorities');
# FIXME return the mappings?
}
subfield => undef,
};
my $cache = Koha::Caches->get_instance();
- my $cache_key = 'elasticsearch_search_fields' . ($params->{is_opac} ? '_opac' : '_staff_client');
+ my $cache_key = 'elasticsearch_search_fields' . ($params->{is_opac} ? '_opac' : '_staff_client') . "_" . $self->index;
my $search_fields = $cache->get_from_cache($cache_key, { unsafe => 1 });
if (!$search_fields) {
# The reason we don't use Koha::SearchFields->search here is we don't