[Koha-bugs] [Bug 30920] Add caching to C4::Biblio::GetAuthorisedValueDesc

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Jan 3 15:12:31 CET 2023


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30920

--- Comment #26 from Jonathan Druart <jonathan.druart+koha at gmail.com> ---
(In reply to Nick Clemens from comment #25)
> (In reply to Jonathan Druart from comment #19)
> > I think this change is coming whereas we don't use the same code to display
> > the descriptions, and it could lead to confusion (theoretically at least):
> > fetch from cache and fetch from DB.
> 
> Can you explain this a bit more? Where are we not using this that could be a
> conflict?

Everywhere we fetch branchname, itemtype's description, av's lib (mainly from
C4)

> > There is at least one thing that could go wrong, itemtype's descriptions.
> > First we only deal with 'en', then it is actually wrong with 'en': it could
> > be overwritten by the "Translate into other languages" feature (yes that's a
> > weird use case but the UI allows it).

> In testing I can provide a French translation and the correct one shows when
> changing languages in search results on both staff and OPAC

Sorry, I think it didn't make sense. I guess I was referring to
Koha::Itemtype->store

+    if ($flush) {
+        my $cache = Koha::Caches->get_instance();
+        my $key = "enItemTypeDescriptions";
+        $cache->clear_from_cache($key);
+    }

But it actually sounds good after having a second look at it.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list