@@ -, +, @@ --- C4/Biblio.pm | 6 +++--- t/db_dependent/Koha/Filter/ExpandCodedFields.t | 5 +++++ t/db_dependent/Koha/Item.t | 1 + 3 files changed, 9 insertions(+), 3 deletions(-) --- a/C4/Biblio.pm +++ a/C4/Biblio.pm @@ -1385,7 +1385,7 @@ sub GetAuthorisedValueDesc { #---- branch if ( $tagslib->{$tag}->{$subfield}->{'authorised_value'} eq "branches" ) { - $cache_key = "LibraryNames"; + $cache_key = "libraries:name"; my $libraries = $cache->get_from_cache( $cache_key, { unsafe => 1 } ); if ( !$libraries ) { $libraries = { @@ -1403,7 +1403,7 @@ sub GetAuthorisedValueDesc { if ( $tagslib->{$tag}->{$subfield}->{'authorised_value'} eq "itemtypes" ) { my $lang = C4::Languages::getlanguage; $lang //= 'en'; - $cache_key = $lang . 'ItemTypeDescriptions'; + $cache_key = 'itemtype:description:' . $lang; my $itypes = $cache->get_from_cache( $cache_key, { unsafe => 1 } ); if ( !$itypes ) { $itypes = @@ -1435,7 +1435,7 @@ sub GetAuthorisedValueDesc { my $dbh = C4::Context->dbh; if ( $category ne "" ) { - $cache_key = "AVDescriptions-" . $category; + $cache_key = "AV_descriptions:" . $category; my $av_descriptions = $cache->get_from_cache( $cache_key, { unsafe => 1 } ); if ( !$av_descriptions ) { $av_descriptions = { --- a/t/db_dependent/Koha/Filter/ExpandCodedFields.t +++ a/t/db_dependent/Koha/Filter/ExpandCodedFields.t @@ -73,6 +73,11 @@ subtest 'ExpandCodedFields tests' => sub { my $cache = Koha::Caches->get_instance; $cache->clear_from_cache("MarcCodedFields-"); + # Clear GetAuthorisedValueDesc-generated cache + $cache->clear_from_cache("libraries:name"); + $cache->clear_from_cache("itemtype:description:en"); + $cache->clear_from_cache("cn_sources:description"); + $cache->clear_from_cache("AV_descriptions:LOST"); C4::Biblio::ModBiblio( $record, $biblio->biblionumber ); $biblio = Koha::Biblios->find( $biblio->biblionumber); --- a/t/db_dependent/Koha/Item.t +++ a/t/db_dependent/Koha/Item.t @@ -1463,6 +1463,7 @@ subtest 'strings_map() tests' => sub { $cache->clear_from_cache("libraries:name"); $cache->clear_from_cache("itemtype:description:en"); $cache->clear_from_cache("cn_sources:description"); + $cache->clear_from_cache("AV_descriptions:LOST"); # Recreating subfields just to be sure tests will be ok # 1 => av (LOST) --