Bug 7387 : Adding a caching plugin for Template::Toolkit
authorChris Cormack <chrisc@catalyst.net.nz>
Thu, 29 Dec 2011 20:25:29 +0000 (09:25 +1300)
committerJared Camins-Esakov <jcamins@cpbibliography.com>
Thu, 7 Mar 2013 15:58:24 +0000 (10:58 -0500)
commit282ec272b12a6597705eea6c5b9d42f50ab6438e
tree0d8a8fff327069c286fb70a1494607f7a951e310
parenta22060a46eb95901b9e0016f58838147ac068be3
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>
Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Koha/Template/Plugin/Cache.pm [new file with mode: 0644]