[Koha-bugs] [Bug 16044] Define a L2 cache for all objects set in cache

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Sat Mar 12 10:52:01 CET 2016


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

Jacek Ablewicz <abl at biblos.pk.edu.pl> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |abl at biblos.pk.edu.pl

--- Comment #2 from Jacek Ablewicz <abl at biblos.pk.edu.pl> ---
Great idea IMO - but only as long as you are caching scalars (like in Bug
11998).. Unfortunately, caching complex data structures that way globally (by
reference) is inherently dangerous and regression-prone. Would be great to have
such mechanism in Koha, but to be on the safe side, it should be used carefully
and selectively (e.g. - let's return a "deep clone" of the cached data
structure by default, and the direct reference only if explicitly asking for
it, etc.).

This patch is tempting - it would provide some big, immediate speed gains for a
lot of scripts if pushed right now, and in this moment it probably would not
break anything important (but only because we don't use Koha::Cache all that
much so far). But on the long term, such method will make Koha::Cache
essentially unusable for caching anything complex - to stay on the safe side,
typically you'll need to meticulously audit a lot of the code to ensure that
data structure fetched from the cache is not getting messed up internally in
any code part between subsequent feches.

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


More information about the Koha-bugs mailing list