From 7d9d79566991dadfaca1a058989d03358a1df6ce Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 10 Mar 2023 15:11:51 +0000 Subject: [PATCH] Bug 30920: (follow-up) Cache key fixes We missed a few places, namely the flushes, when renaming the cache keys. Signed-off-by: Martin Renvoize Signed-off-by: Tomas Cohen Arazi --- C4/Biblio.pm | 2 +- Koha/ClassSource.pm | 2 +- Koha/ItemType.pm | 2 +- Koha/Library.pm | 2 +- Koha/Localization.pm | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/C4/Biblio.pm b/C4/Biblio.pm index 991d32716b..96f494d899 100644 --- a/C4/Biblio.pm +++ b/C4/Biblio.pm @@ -1413,7 +1413,7 @@ sub GetAuthorisedValueDesc { } if ( $tagslib->{$tag}->{$subfield}->{'authorised_value'} eq "cn_source" ) { - $cache_key = "ClassSources"; + $cache_key = "cn_sources:description"; my $cn_sources = $cache->get_from_cache( $cache_key, { unsafe => 1 } ); if ( !$cn_sources ) { $cn_sources = { diff --git a/Koha/ClassSource.pm b/Koha/ClassSource.pm index 5a2011a65f..cabb0add58 100644 --- a/Koha/ClassSource.pm +++ b/Koha/ClassSource.pm @@ -53,7 +53,7 @@ sub store { if ($flush) { my $cache = Koha::Caches->get_instance(); - $cache->clear_from_cache('ClassSources'); + $cache->clear_from_cache('cn)sources:description'); } return $self; diff --git a/Koha/ItemType.pm b/Koha/ItemType.pm index 754acc97d1..0a8c335ddf 100644 --- a/Koha/ItemType.pm +++ b/Koha/ItemType.pm @@ -60,7 +60,7 @@ sub store { if ($flush) { my $cache = Koha::Caches->get_instance(); - my $key = "enItemTypeDescriptions"; + my $key = "itemtype:description:en"; $cache->clear_from_cache($key); } diff --git a/Koha/Library.pm b/Koha/Library.pm index a68cd8da8e..fa4496c323 100644 --- a/Koha/Library.pm +++ b/Koha/Library.pm @@ -60,7 +60,7 @@ sub store { if ($flush) { my $cache = Koha::Caches->get_instance(); - $cache->clear_from_cache('LibraryNames'); + $cache->clear_from_cache('libraries:name'); } return $self; diff --git a/Koha/Localization.pm b/Koha/Localization.pm index c700c42d6e..790c8729b4 100644 --- a/Koha/Localization.pm +++ b/Koha/Localization.pm @@ -43,7 +43,7 @@ sub store { if ($self->entity eq 'itemtypes') { my $cache = Koha::Caches->get_instance(); - my $key = $self->lang."ItemTypeDescriptions"; + my $key = "itemtype:description:".$self->lang; $cache->clear_from_cache($key); } -- 2.39.5