Bugzilla – Attachment 148091 Details for
Bug 30920
Add caching to C4::Biblio::GetAuthorisedValueDesc
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30920: (follow-up) Cache key fixes
Bug-30920-follow-up-Cache-key-fixes.patch (text/plain), 2.57 KB, created by
Martin Renvoize (ashimema)
on 2023-03-10 16:38:14 UTC
(
hide
)
Description:
Bug 30920: (follow-up) Cache key fixes
Filename:
MIME Type:
Creator:
Martin Renvoize (ashimema)
Created:
2023-03-10 16:38:14 UTC
Size:
2.57 KB
patch
obsolete
>From 67595763da1ba166b078c49d7241a03a1b8b4033 Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >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 <martin.renvoize@ptfs-europe.com> >--- > 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 d09e4596de..bcfae623bc 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.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 30920
:
135771
|
136292
|
136293
|
144817
|
144818
|
144819
|
148064
|
148065
|
148066
|
148067
|
148087
|
148088
|
148089
|
148090
| 148091 |
148092
|
148093
|
148094