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

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Fri Jun 17 18:13:00 CEST 2022


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

--- Comment #16 from Martin Renvoize <martin.renvoize at ptfs-europe.com> ---
(In reply to Fridolin Somers from comment #12)
> Just to be sure.
> 
> The is already a L1 cache for authorized values in
> get_description(s)_by_koha_field()
> See Bug 17642 
> It says L2 cache is unsafe :
> https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17642#c35
> 
> If L2 cache is fine and flush managed in store().
> Could we cache directly in find() ?
> That would increase performance everywhere using ORM.

Caching a find doesn't make much sense.. simple key lookup is super fast in
SQL. What's worth caching is complex searches or complex structures built from
multiple searches.. especially when we're running them inside loops.

This change makes sense because we call the function inside the search result
loop a lot and it's a fairly complex structure so having it immediately there
to lookup from is good.

As for 'not safe'.. I have no idea where that comment comes from. So long as we
catch flushing correctly I don't see how any L2 is unsafe as such... Sometimes
it's not worthwhile, but not unsafe if it's done correctly.

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


More information about the Koha-bugs mailing list