Summary: | Koha should use CHI caching framework | ||
---|---|---|---|
Product: | Koha | Reporter: | Jared Camins-Esakov <jcamins> |
Component: | Architecture, internals, and plumbing | Assignee: | Jared Camins-Esakov <jcamins> |
Status: | CLOSED FIXED | QA Contact: | |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | chris, dpavlin, paul.poulain |
Version: | 3.10 | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Circulation function: | |||
Attachments: |
Bug 8092: Convert Koha::Cache to use CHI
Bug 8092: Convert Koha::Cache to use CHI Bug 8092: Convert Koha::Cache to use CHI Bug 8092 follow-up: Add optional dependency on CHI Bug 8092: Cheer up Jenkins on loading Cache modules Bug 8092: Cheer up Jenkins on loading Cache modules Bug 8092 follow-up: Fix perlcritic violations |
Description
Jared Camins-Esakov
2012-05-15 16:28:40 UTC
In order to do this, we will need packages for Squeeze for libchi-perl and libchi-driver-memcached-perl, and their dependencies. Created attachment 9593 [details] [review] Bug 8092: Convert Koha::Cache to use CHI Implements cache handlers for Memcached, mmap shared-file persistent, and in-process memory caches. To test: run t/Cache.t with the following options: 1. Tests 3-9 should be skipped with the following: export CACHING_SYSTEM= 2. export CACHING_SYSTEM=memory 3. export CACHING_SYSTEM=fastmmap 4. You will need memcached activated for the following to work: export CACHING_SYSTEM=memcached export MEMCACHED_SERVERS=127.0.0.1:11211 export MEMCACHED_NAMESPACE=KOHA 5. You should receive two failures with the following: export CACHING_SYSTEM=thisdoesntexist Created attachment 9595 [details] [review] Bug 8092: Convert Koha::Cache to use CHI Implements cache handlers for Memcached, mmap shared-file persistent, and in-process memory caches. If CHI is unavailable, Koha::Cache::Memcached will fall back to using Cache::Memcached::Fast, or caching will be skipped without croaking. To test: run t/Cache.t with the following options, before and after installing CHI: 2. Tests 3-9 should be skipped with the following: export CACHING_SYSTEM= 2. You should receive two failures with the following if CHI is not installed: export CACHING_SYSTEM=memory 3. You should receive two failures with the following if CHI is not installed: export CACHING_SYSTEM=fastmmap 4. You will need memcached activated for the following to work (but it will work both with and without CHI): export CACHING_SYSTEM=memcached export MEMCACHED_SERVERS=127.0.0.1:11211 export MEMCACHED_NAMESPACE=KOHA 5. You should receive two failures with the following: export CACHING_SYSTEM=thisdoesntexist Works, but needs follow ups to update the dependencies in all the places that should be done. Created attachment 9664 [details] [review] Bug 8092: Convert Koha::Cache to use CHI Implements cache handlers for Memcached, mmap shared-file persistent, and in-process memory caches. If CHI is unavailable, Koha::Cache::Memcached will fall back to using Cache::Memcached::Fast, or caching will be skipped without croaking. To test: run t/Cache.t with the following options, before and after installing CHI: 2. Tests 3-9 should be skipped with the following: export CACHING_SYSTEM= 2. You should receive two failures with the following if CHI is not installed: export CACHING_SYSTEM=memory 3. You should receive two failures with the following if CHI is not installed: export CACHING_SYSTEM=fastmmap 4. You will need memcached activated for the following to work (but it will work both with and without CHI): export CACHING_SYSTEM=memcached export MEMCACHED_SERVERS=127.0.0.1:11211 export MEMCACHED_NAMESPACE=KOHA 5. You should receive two failures with the following: export CACHING_SYSTEM=thisdoesntexist Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Works as advertised, now we need a follow up to add the new dependency. http://bugs.koha-community.org/show_bug.cgi?id=8029 QA comment: none, except the dependencies are needed, please provide them in a follow-up. Created attachment 9802 [details] [review] Bug 8092 follow-up: Add optional dependency on CHI QA comments: looks correct. perlcritic OK. passed QA Created attachment 10037 [details] [review] Bug 8092: Cheer up Jenkins on loading Cache modules Created attachment 10093 [details] [review] Bug 8092: Cheer up Jenkins on loading Cache modules Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> QA comment: The follow-up intend to remove any error if CHI is not installed (as it's optional). Nothing specific to say, probably the most logical way to do it ! Created attachment 10281 [details] [review] Bug 8092 follow-up: Fix perlcritic violations Apparently you are not supposed to use "return undef;" or perlcritic gets mad. Sorry, perlcritic! Trivial patch, will push immediately to fix jenkins CHI-based caching is available in Master. |