Bug 8089: Cache sysprefs with Koha::Cache::Object
authorJared Camins-Esakov <jcamins@cpbibliography.com>
Sun, 20 Jan 2013 01:28:58 +0000 (20:28 -0500)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Thu, 21 Mar 2013 23:15:31 +0000 (19:15 -0400)
commitf2c8262faef00a2727ac201be34d88cdb0544d99
tree3a8f8ab9a260729abe4e98ae0c259773369230e5
parentcc49dc70fbadb776360b1679616f81388ca71252
Bug 8089: Cache sysprefs with Koha::Cache::Object

This patch replaces the %sysprefs hash variable with a
Koha::Cache::Object-tied hash that allows the user to cache sysprefs
in memcached, fastmmap, or memory.

To test:
1) Enable the cache as described on bug 9434.
2) Try viewing some pages in the OPAC and staff client. If the syspref
   caching isn't working, you'll be redirected to the web installer
   (in the staff client) or be shown the maintenance page (in the OPAC).
3) Disable the cache by unsetting the CACHING_SYSTEM environment
   variable.
4) Try viewing some pages in the OPAC and staff client. If the syspref
   caching isn't working, you'll be redirected to the web installer
   (in the staff client) or be shown the maintenance page (in the OPAC).

Note that this will not improve performance. It does, however, eliminate
the problem of sysprefs not getting updated in all threads in
multi-threaded environments.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
C4/Context.pm