Bug 37349: (follow-up) Cache the authority type, not just the key

Test were failing because I neglected to store the value in the cache, I was only
adding the cache key

Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Nick Clemens 2024-11-22 17:11:07 +00:00 committed by Katrin Fischer
parent 62e8bae08d
commit 5a96b729f5
Signed by: kfischer
GPG key ID: 0EF6E2C03357A834

View file

@ -716,7 +716,10 @@ sub LinkBibHeadingsToAuthorities {
$memory_cache->get_from_cache( "LinkBibHeadingsToAuthorities:AuthorityType:" . $heading->auth_type() );
unless ($authority_type) {
$authority_type = Koha::Authority::Types->find( $heading->auth_type() );
$memory_cache->set_in_cache( "LinkBibHeadingsToAuthorities:AuthorityType:" . $heading->auth_type() );
$memory_cache->set_in_cache(
"LinkBibHeadingsToAuthorities:AuthorityType:" . $heading->auth_type(),
$authority_type
);
}
if ( defined $current_link
&& (!$allowrelink || C4::Context->preference('LinkerKeepStale')) )