]> git.koha-community.org Git - koha.git/commit
Bug 11998: Add a L1 cache for sysprefs
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 10 Mar 2016 08:55:27 +0000 (08:55 +0000)
committerJulian Maurice <julian.maurice@biblibre.com>
Wed, 23 Mar 2016 06:55:51 +0000 (07:55 +0100)
commitd786b63fb595ca681834d801741738ea6688f8bc
tree0ca0bbad6f31be23ef7ccca099785f5e8e9b3e90
parent8c2186b402e2b00f6ca110589a0774046be51211
Bug 11998: Add a L1 cache for sysprefs

Accessing to the cache for each call to C4::Context->preference might
have an impact on performances.
To avoid that this patch introduces a L1 cache (simple hashref). It will
be populated by accessing the L2 cache (Koha::Cache).
If a pref is retrieved 10x, the first one will get the value from the L2
cache, then the L1 cache will be check.
To do so we will need to clear the L1 cache every time a page is loaded.

Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
(cherry picked from commit 47fbbb7cf5e7ef2f9ef422e2fd9232066100a64b)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
C4/Context.pm