[Bug 7387] New: Add Template::Toolkit plugin to allow caching of includes
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7387 Bug #: 7387 Summary: Add Template::Toolkit plugin to allow caching of includes Classification: Unclassified Change sponsored?: --- Product: Koha Version: master Platform: All OS/Version: All Status: NEW Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing AssignedTo: gmcharlt@gmail.com ReportedBy: chris@bigballofwax.co.nz QAContact: ian.walls@bywatersolutions.com Depends on: 929, 7248 -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7387 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED AssignedTo|gmcharlt@gmail.com |chris@bigballofwax.co.nz -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7387 --- Comment #1 from Chris Cormack <chris@bigballofwax.co.nz> 2011-12-29 20:26:51 UTC --- Created attachment 6959 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=6959 Bug 7387 : Adding a caching plugin for Template::Toolkit And an example of how to use it -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7387 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - low |PATCH-Sent Patch Status|--- |Needs Signoff -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7387 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #6959|0 |1 is obsolete| | --- Comment #2 from Jared Camins-Esakov <jcamins@cpbibliography.com> 2012-01-28 15:08:36 UTC --- Created attachment 7368 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=7368 Bug 7387 : Adding a caching plugin for Template::Toolkit And an example of how to use it Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7387 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |jcamins@cpbibliography.com -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7387 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|PATCH-Sent (DO NOT USE) |P1 - high Status|Signed Off |In Discussion CC| |paul.poulain@biblibre.com --- Comment #3 from Paul Poulain <paul.poulain@biblibre.com> 2012-02-03 10:43:12 UTC --- Setting this one to "in discussion", as it's linked to bug 7248 QA comment: chris, there is no explanation of the positive effect of this. What would be the next step if this patch is included ? could we do that with all includes ? more explanation welcomed ! -- Configure bugmail: http://bugs.koha-community.org/bugzilla3/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7387 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |ASSIGNED --- Comment #4 from Paul Poulain <paul.poulain@biblibre.com> --- I remove the "in discussion" status. This patch is very interesting, but bug 7248 does not apply anymore, so this patch can't apply until 7248 has been rewritten. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7387 Dobrica Pavlinusic <dpavlin@rot13.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dpavlin@rot13.org -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7387 Status|Pushed to Master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7387 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff CC| |jonathan.druart@biblibre.co | |m --- Comment #5 from Jonathan Druart <jonathan.druart@biblibre.com> --- Bug 7248 is pushed, I switch this one to "Signed off" -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7387 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=7387 Ian Walls <koha.sekjal@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #6 from Ian Walls <koha.sekjal@gmail.com> --- Mostly just adding the new plugin, which appears to be functional. Example of usage in intranet-main, to get the doc-head-open.inc for 6 minutes. Should be an easy enough thing to revert if we later find some deep dark nastiness, but I can't see any right now, and will mark Passed QA. Note that 3-way merge is required... git bz is not applying for me here directly. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7387 --- Comment #7 from Paul Poulain <paul.poulain@biblibre.com> --- (In reply to comment #3)
QA comment: chris, there is no explanation of the positive effect of this. What would be the next step if this patch is included ? could we do that with all includes ? more explanation welcomed !
Chris, before pushing this patch, i'd like to understand what will be the next step. Should all templates be switched to: -[% INCLUDE 'doc-head-open.inc' %] +[% USE cache = Cache %] +[% cache.inc( + 'template' => 'doc-head-open.inc', + 'keys' => {'dochead' => 'dochead'}, + 'ttl' => 360 + ) +%] ? (if that's the case, then I'll add this to my next RM newsletter & send a mail to koha-devel about that) Do you already have a list of other .inc we could cache too ? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7387 --- Comment #8 from Chris Cormack <chris@bigballofwax.co.nz> --- (In reply to comment #7)
(In reply to comment #3)
QA comment: chris, there is no explanation of the positive effect of this. What would be the next step if this patch is included ? could we do that with all includes ? more explanation welcomed !
Chris, before pushing this patch, i'd like to understand what will be the next step. Should all templates be switched to: -[% INCLUDE 'doc-head-open.inc' %] +[% USE cache = Cache %] +[% cache.inc( + 'template' => 'doc-head-open.inc', + 'keys' => {'dochead' => 'dochead'}, + 'ttl' => 360 + ) +%]
? (if that's the case, then I'll add this to my next RM newsletter & send a mail to koha-devel about that) Do you already have a list of other .inc we could cache too ?
Nope d, in fact caching that one won't win us much at all it's fast to render anyway. But looking into caching things that require computation, would be good. This patch is just to enable people to cache includes when they find ones, or even better create includes and cache them. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7387 Paul Poulain <paul.poulain@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Failed QA --- Comment #9 from Paul Poulain <paul.poulain@biblibre.com> --- (In reply to comment #8)
Nope d, in fact caching that one won't win us much at all it's fast to render anyway. But looking into caching things that require computation, would be good. This patch is just to enable people to cache includes when they find ones, or even better create includes and cache them.
mmm... I'm not sure this patch should be pushed as is : if it's a good idea, the -[% INCLUDE 'doc-head-open.inc' %] +[% USE cache = Cache %] +[% cache.inc( + 'template' => 'doc-head-open.inc', + 'keys' => {'dochead' => 'dochead'}, + 'ttl' => 360 + ) +%] is useless, so should be removed, and a more useful example used ? QA comment: isn't {'cache_servers' => C4::Context->config('memcached_servers') } as memcache is the default server for Koha::Cache ? marking failed QA for now -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7387 Chris Cormack <chris@bigballofwax.co.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=7387 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #7368|0 |1 is obsolete| | --- Comment #10 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 14358 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=14358&action=edit Bug 7387 : Adding a caching plugin for Template::Toolkit To use this you need to do something like -[% INCLUDE 'doc-head-open.inc' %] +[% USE cache = Cache %] +[% cache.inc( + 'template' => 'doc-head-open.inc', + 'keys' => {'dochead' => 'dochead'}, + 'ttl' => 360 + ) +%] Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7387 Fridolyn SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolyn.somers@biblibre.co | |m -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7387 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #14358|0 |1 is obsolete| | --- Comment #11 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Created attachment 15502 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=15502&action=edit [SIGNED-OFF] Bug 7387 : Adding a caching plugin for Template::Toolkit To use this you need to do something like -[% INCLUDE 'doc-head-open.inc' %] +[% USE cache = Cache %] +[% cache.inc( + 'template' => 'doc-head-open.inc', + 'keys' => {'dochead' => 'dochead'}, + 'ttl' => 360 + ) +%] Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Comment: Works. Tested modifying as described opac-main.tt Follow up to fix tabulations. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7387 --- Comment #12 from Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> --- Created attachment 15503 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=15503&action=edit Follow-up Bug 7387 - Add Template::Toolkit plugin to allow caching of includes Fixes tabulations. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7387 Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |bgkriegel@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7387 Elliott Davis <elliott@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #15503|0 |1 is obsolete| | --- Comment #13 from Elliott Davis <elliott@bywatersolutions.com> --- Created attachment 15892 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=15892&action=edit Bug 7387 : Adding a caching plugin for Template::Toolkit To use this you need to do something like -[% INCLUDE 'doc-head-open.inc' %] +[% USE cache = Cache %] +[% cache.inc( + 'template' => 'doc-head-open.inc', + 'keys' => {'dochead' => 'dochead'}, + 'ttl' => 360 + ) +%] Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com> Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com> Comment: Works. Tested modifying as described opac-main.tt Follow up to fix tabulations. Signed-off-by: Elliott Davis <elliott@bywatersolions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7387 Elliott Davis <elliott@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #15502|0 |1 is obsolete| | --- Comment #14 from Elliott Davis <elliott@bywatersolutions.com> --- Created attachment 15893 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=15893&action=edit Follow-up Bug 7387 - Add Template::Toolkit plugin to allow caching of includes Fixes tabulations. Signed-off-by: Elliott Davis <elliott@bywatersolions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7387 Elliott Davis <elliott@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |elliott@bywatersolutions.co | |m -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7387 Jared Camins-Esakov <jcamins@cpbibliography.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #15 from Jared Camins-Esakov <jcamins@cpbibliography.com> --- This patch has been pushed to master. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=7387 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de QA Contact|koha.sekjal@gmail.com |elliott@bywatersolutions.co | |m Severity|enhancement |new feature -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org