https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40554 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au, | |lucas@bywatersolutions.com, | |m.de.rooy@rijksmuseum.nl, | |martin.renvoize@openfifth.c | |o.uk, | |nick@bywatersolutions.com, | |pedro.amorim@openfifth.co.u | |k, tomascohen@gmail.com Status|NEW |In Discussion --- Comment #4 from Jonathan Druart <jonathan.druart@gmail.com> --- I believe we can reduce the number of DB hits, particularly when retrieving authorised value descriptions within loops, by using our caching mechanism. Here are my suggestions: 1. Use a cache for single descriptions to avoid one DB fetch per description (see Koha::AuthorisedValues->find_description) 2. Replace ->search with ->find since we now have a unique constraint on (code, value).3. Remove the 5-second expiration in C4::Koha::GetAuthorisedValues. This seems to be a leftover from when we were less confident in our cache invalidation. 4. Use a dedicated namespace for authorised values. The trade-off here is that any modification to a value will clear the entire cache, but this should not be a frequent operation. Is it worth investing more time in this? Who supports this idea? TODO: * Should Koha::ILL::Request->statusalias use search_with_library_limits instead of search? * Can Koha::Patron::Attribute->authorised_value be removed now? LATER: * Remove the in-memory cache only from the Koha::AuthorisedValues->search_* methods and consider using L2 cache. (?) -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.