[Bug 12041] New: Improve Koha::Cache
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12041 Bug ID: 12041 Summary: Improve Koha::Cache Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: gmcharlt@gmail.com Reporter: robin@catalyst.net.nz QA Contact: testopia@bugs.koha-community.org Koha::Cache can be improved to fall back more reliably, to handle complex data types, and so on. This is necessary to allow caching of things properly under plack. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12041 Robin Sheat <robin@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |9967 Assignee|gmcharlt@gmail.com |robin@catalyst.net.nz -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12041 Robin Sheat <robin@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Medium patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12041 --- Comment #1 from Robin Sheat <robin@catalyst.net.nz> --- Created attachment 26891 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=26891&action=edit Bug 12041 - improve Koha::Cache This makes Koha::Cache behave better by default. It will use memcached if available to do shared caching, if that's not available it will fall back to in-memory caching. It also allows for a singleton accessor to allow a single cache to be shared within a process. Test plan: * The t/Cache.t file runs successfully with and without the MEMCACHED_SERVERS envvar set (and memcached running in the environment.) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12041 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |chris@bigballofwax.co.nz --- Comment #2 from Chris Cormack <chris@bigballofwax.co.nz> --- (In reply to Robin Sheat from comment #1)
Created attachment 26891 [details] [review] Bug 12041 - improve Koha::Cache
This makes Koha::Cache behave better by default. It will use memcached if available to do shared caching, if that's not available it will fall back to in-memory caching. It also allows for a singleton accessor to allow a single cache to be shared within a process.
Test plan: * The t/Cache.t file runs successfully with and without the MEMCACHED_SERVERS envvar set (and memcached running in the environment.)
You will want to test that storing utf8 and retrieving it still works. If this change munches utf8 then it makes the caching unusable in a lot of situations. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12041 --- Comment #3 from Robin Sheat <robin@catalyst.net.nz> --- Created attachment 26908 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=26908&action=edit Bug 12041 - utf8 compatibility changes Switched to Cache::Memcached::Fast due to its better support for unicode, added to the test case so that we notice if something causes it to break. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12041 Robin Sheat <robin@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #26891|0 |1 is obsolete| | Attachment #26908|0 |1 is obsolete| | --- Comment #4 from Robin Sheat <robin@catalyst.net.nz> --- Created attachment 26909 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=26909&action=edit Bug 12041 - improve Koha::Cache This makes Koha::Cache behave better by default. It will use memcached if available to do shared caching, if that's not available it will fall back to in-memory caching. It also allows for a singleton accessor to allow a single cache to be shared within a process. Added tests to confirm UTF8-cleanness. Test plan: * The t/Cache.t file runs successfully with and without the MEMCACHED_SERVERS envvar set (and memcached running in the environment.) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12041 Robin Sheat <robin@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=8089 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12041 Robin Sheat <robin@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #26909|0 |1 is obsolete| | --- Comment #5 from Robin Sheat <robin@catalyst.net.nz> --- Created attachment 26949 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=26949&action=edit Bug 12041 - improve Koha::Cache This makes Koha::Cache behave better by default. It will use memcached if available to do shared caching, if that's not available it will fall back to in-memory caching. It also allows for a singleton accessor to allow a single cache to be shared within a process. * Added tests to confirm UTF8-cleanness. * Added minor fixups to stop warnings. Test plan: * The t/Cache.t file runs successfully with and without the MEMCACHED_SERVERS envvar set (and memcached running in the environment.) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12041 Robin Sheat <robin@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #26949|0 |1 is obsolete| | --- Comment #6 from Robin Sheat <robin@catalyst.net.nz> --- Created attachment 27381 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=27381&action=edit Bug 12041 - improve Koha::Cache This makes Koha::Cache behave better by default. It will use memcached if available to do shared caching, if that's not available it will fall back to in-memory caching. It also allows for a singleton accessor to allow a single cache to be shared within a process. * Added tests to confirm UTF8-cleanness. * Added minor fixups to stop warnings. Test plan: * The t/Cache.t file runs successfully with and without the MEMCACHED_SERVERS envvar set (and memcached running in the environment.) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12041 Magnus Enger <magnus@enger.priv.no> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |magnus@enger.priv.no Blocks| |12173 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12041 Brendan Gallagher <brendan@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |brendan@bywatersolutions.co | |m --- Comment #7 from Brendan Gallagher <brendan@bywatersolutions.com> --- Robin - *** ERROR: Spurious text after =cut =over on line 219 without closing =back (at head2) in file Koha/Cache.pm Pretty simple clean up. I tested and it's working, happy to signoff with the follow up for that - or I can ignore that and just tell the QA to follow up or the RM to followup when pushing. let me know what to do. -Brendan -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12041 --- Comment #8 from Robin Sheat <robin@catalyst.net.nz> --- Created attachment 28415 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=28415&action=edit Bug 12041 - POD fixing followup This fixes a minor POD error detected, and also adds the Koha/ directory to the regular test case so that the in-repo tests can find these things. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12041 Robin Sheat <robin@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12041 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |11842 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12041 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@biblibre.co | |m --- Comment #9 from Jonathan Druart <jonathan.druart@biblibre.com> --- Robin, All looks good but I don't understand something in the current code. In Koha/Cache.pm 458 unless ( lc( $args->{cache_type} ) eq 'null' ) { 459 $args->{'cache'} = $self; 460 $args->{'cache_type'} ||= $ENV{'CACHING_SYSTEM'}; 461 } Isn't it $self->{cache_type} instead of $args->{cache_type}? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12041 --- Comment #10 from Robin Sheat <robin@catalyst.net.nz> --- (In reply to Jonathan Druart from comment #9)
Isn't it $self->{cache_type} instead of $args->{cache_type}?
I don't think so, it's just figuring out the defaults and adding them to the $args hashref. That's then passed on to Koha::Cache::Object when it's tied. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12041 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #27381|0 |1 is obsolete| | Attachment #28415|0 |1 is obsolete| | --- Comment #11 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 28611 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=28611&action=edit Bug 12041 - improve Koha::Cache This makes Koha::Cache behave better by default. It will use memcached if available to do shared caching, if that's not available it will fall back to in-memory caching. It also allows for a singleton accessor to allow a single cache to be shared within a process. * Added tests to confirm UTF8-cleanness. * Added minor fixups to stop warnings. Test plan: * The t/Cache.t file runs successfully with and without the MEMCACHED_SERVERS envvar set (and memcached running in the environment.) Signed-off-by: Brendan Gallagher <brendan@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12041 --- Comment #12 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 28612 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=28612&action=edit Bug 12041 - POD fixing followup This fixes a minor POD error detected, and also adds the Koha/ directory to the regular test case so that the in-repo tests can find these things. Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12041 --- Comment #13 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 28613 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=28613&action=edit Bug 12041: UT - Get rid of warnings Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12041 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12041 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12041 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |tomascohen@gmail.com --- Comment #14 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master. Thanks Robin! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12041 --- Comment #15 from Jonathan Druart <jonathan.druart@biblibre.com> --- This patch set changed the prototype of set_in_cache, but did not update the calls in t/Cache.t. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org