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

Jonathan Druart <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected],
                   |                            |[email protected],
                   |                            |[email protected],
                   |                            |[email protected]
                   |                            |o.uk,
                   |                            |[email protected],
                   |                            |[email protected]
                   |                            |k, [email protected]
             Status|NEW                         |In Discussion

--- Comment #4 from Jonathan Druart <[email protected]> ---
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.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to