https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16166 --- Comment #9 from Jacek Ablewicz <abl@biblos.pk.edu.pl> --- (In reply to Jonathan Druart from comment #7)
(In reply to Jonathan Druart from comment #6)
Created attachment 49730 [details] [review] [review] Bug 16166: Try to add readability
I tried to add readability to the Koha::Cache method, but not sure I did it.
Some parts of it certainly look good to me, thanks. I skipped some parts because: - wrapping scalars in { value => ... } makes it a bit slower for caching small scalars (like system preferences) - not much slower, but measurably slower, and this patch set is supposed to be as speed-neutral as possible even in the "worst case scenarios" - I think that we need to keep a separatelly thawed structure in L1 for a sole purpose of unsafe => 1 calls; if not, the "feature" described in comment #4 would be broken; also, there is no need to do 2nd thaw immediately / in advance, it may be never used e.g. if all get_from_cache() calls for a given key are of the "safe" kind (and a lot of scripts are doing just one single call) - it's more optimal to delay 2nd thaw to the moment when the 1st "unsafe" call is being made; if the 1st call is "unsafe", there would be only one thaw - I did s/{value}/{thawed}/ - there are too many $value variables in that code, it's hard to distiguish what is what -- You are receiving this mail because: You are watching all bug changes.