Bug 36399 - Better fetch/cache the authorised values
Summary: Better fetch/cache the authorised values
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 36398
  Show dependency treegraph
 
Reported: 2024-03-22 10:07 UTC by Jonathan Druart
Modified: 2024-04-17 14:56 UTC (History)
0 users

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2024-03-22 10:07:24 UTC
The code improved recently but it's still not consistent and wrongly done.

We have "special" authorised value category (branches, locations, itemtypes, etc.) that can be used in some places and not in others.

* C4::Koha::GetAuthorisedValues does not handle them

* Koha/UI/Form/Builder/Item.pm does

* TT plugin AuthorisedValues.GetByCode does not retrieve from cache

etc...

We should have big structs cached in L1.

When we need to access the description of a given value: { category => { value_1 => { %$av }, etc. }

In other places when we need to fetch a whole (ordered) list: { category => [ @avs ] }