Bug 8089: Use Koha::Cache for all caching
authorJared Camins-Esakov <jcamins@cpbibliography.com>
Mon, 14 May 2012 11:27:29 +0000 (13:27 +0200)
committerPaul Poulain <paul.poulain@biblibre.com>
Fri, 7 Sep 2012 14:28:29 +0000 (16:28 +0200)
commit215abc8024d93f1b6a10f26427a65bd64d106e52
tree8a0693aeac65d89b46636319baacb7073f2c5821
parent47126e10f92244359531971ef44837ddbf1ec013
Bug 8089: Use Koha::Cache for all caching

1. Replace all instances of memoize_memcached with appropriate calls
into Koha::Cache:
* reports/guided_reports.pl
* C4::Biblio::GetMarcStructure
* C4::Languages::getFrameworkLanguages
* C4::Languages::getAllLanguages
* C4::SQLHelper::GetPrimaryKeys
* C4::SQLHelper::_get_columns

2. Replace all references to memcached with the appropriate calls into
Koha::Cache in C4::Context.

Test plan :
* have DEBUG env set to 1
* reach addbiblio page to test the patch in Biblio.pm, or setup more than 1
  language
* you should see in the logs that you're reading and writing from cache
* run the test suite twice both with and without the following environment
  variables set:
export MEMCACHED_SERVERS=127.0.0.1:11211
export MEMCACHED_NAMESPACE=KOHA
export CACHING_SYSTEM=memcached

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
I'm unsure about some of the caching times 10000 is a long long time,
but other than that, works fine.
C4/Biblio.pm
C4/Context.pm
C4/Languages.pm
C4/SQLHelper.pm
Koha/Cache.pm
reports/guided_reports.pl
t/Cache.t