]> git.evergreen-ils.org Git - Evergreen.git/commit
LP#1449709: caching compiled Template Toolkit templates
authorGalen Charlton <gmc@esilibrary.com>
Tue, 28 Apr 2015 19:06:48 +0000 (19:06 +0000)
committerBill Erickson <berickxx@gmail.com>
Wed, 10 Jun 2015 17:34:31 +0000 (13:34 -0400)
commita42f4e9f3d45a5dbc5eefcd86f0d0ee0ad001660
treeff52654b5ca806859b35782b2b5be475220fbf8e
parentbc55788c14222f5b40db418d5faa841350dd42c5
LP#1449709: caching compiled Template Toolkit templates

This patch enables caching of compiled Template Toolkit
files on Evergreen web servers, which can provide a modest
improvement in the time it takes (say) TPAC to render
a page, particularly by a fresh Apache backend.

This is controlled by a new Apache virtualhost variable,
OILSWebCompiledTemplateCache, which can be set to a
directory on the webserver for storing compiled templates. This
is enabled by default for new installations.

This patch also adds OILSWebTemplateStatTTL, which can be
use to tweak the STAT_TTL Template Toolkit setting. Note this
bit works because of the caching of TT handlers added by
the previous patch.

Finally, this patch also fixes a bug where attempting to
disable OILSWebDebugTemplate would result in internal server errors;
it also sets the default value of this setting to false.

Note: the caching added by this patch and the previous one
mean that if a change to (say) TPAC templates is made on
the file system, it is now required to reload Apache to have
a guarantee that the change is visible, although one can also
wait the OILSWebTemplateStatTTL interval.

Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
Signed-off-by: Galen Charlton <gmc@esilibrary.com>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/examples/apache/eg_vhost.conf.in
Open-ILS/examples/apache_24/eg_vhost.conf.in
Open-ILS/src/perlmods/lib/OpenILS/WWW/EGWeb.pm