[Koha-bugs] [Bug 32092] New: Improve circulation rules cache utilization
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Thu Nov 3 15:23:01 CET 2022
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32092
Bug ID: 32092
Summary: Improve circulation rules cache utilization
Change sponsored?: ---
Product: Koha
Version: master
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P5 - low
Component: Architecture, internals, and plumbing
Assignee: koha-bugs at lists.koha-community.org
Reporter: glasklas at gmail.com
QA Contact: testopia at bugs.koha-community.org
Currently the cache is bypassed when fetching of circulation rules in a lot of
places, calling get_effective_rule instead of get_effective_rule_value which
makes use of in-memory cached. Additionally the case where the rule value is an
empty string or undefined or no rule is found are not currently cached which
results in the database is being queried repeatedly for cases where no results
are found (which usually are the majority of calls). For example on the page
where items are listed when placing a hold the current hit ratio for the cache
in get_effective_rule_value is about 6%, with this patch we instead get a hit
ratio of 99.8%, resulting in a whooping 340x less time spent performing the
database lookup in get_effective_rule_value. With 150 items (we have serials
with up to 1400 items), about 50% of the execution time is spent looking up
rules which is practically reduced to zero when also caching empty results (and
replacing the uncached direct calls to get_effective_rule with
get_effective_rule_value).
--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
More information about the Koha-bugs
mailing list