Bug 11998: Use Koha::Cache to cache sysprefs
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 3 Mar 2016 16:54:30 +0000 (16:54 +0000)
committerJulian Maurice <julian.maurice@biblibre.com>
Wed, 23 Mar 2016 06:41:27 +0000 (07:41 +0100)
commitc65c69a4cb3a3aae2097bcaff5f406349d0415a8
tree26342d426d23beb242f7aa2e9aa38408dfb94ea8
parent0d904b655e65f70476c5d7daf355cc7c3cf0976b
Bug 11998: Use Koha::Cache to cache sysprefs

At the moment, the sysprefs are only cache in the thread memory
executing the processus
When using Plack, that means we need to clear the syspref cache on each
page.
To avoid that, we can use Koha::Cache to cache the sysprefs correctly.

A big part of the authorship of this patch goes to Robin Sheat.

Test plan:
1/ Add/Update/Delete local use prefs
2/ Update pref values and confirm that the changes are correctly taken
into account

Signed-off-by: Chris <chrisc@catalyst.net.nz>
Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Tested with plack with syspref cache enabled, there is some time between setting the syspref and applying it, but it takes just one reload of page, it shouldn't be problem, should it?
Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar>
Signed-off-by: Jacek Ablewicz <abl@biblos.pk.edu.pl>
Tested with CGI and CGI + memcache; some small issues still remain,
but it would be better to deal with them in separate bug reports
if necessary

Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com
(cherry picked from commit 9820f9dfbd63ecc812b6b2a4ec71af91f303f933)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
C4/Context.pm
Koha/Config/SysPref.pm
admin/preferences.pl
admin/systempreferences.pl
misc/admin/koha-preferences
svc/config/systempreferences
t/db_dependent/Context.t
t/db_dependent/sysprefs.t