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 <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
(cherry picked from commit 7d9d795669)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
This commit is contained in:
Martin Renvoize 2023-03-10 15:11:51 +00:00 committed by Matt Blenkinsop
parent 65da256011
commit 4fb35a7879
5 changed files with 5 additions and 5 deletions

View file

@ -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 = {

View file

@ -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;

View file

@ -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);
}

View file

@ -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;

View file

@ -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);
}