LP#1449709: caching compiled Template Toolkit templates
authorGalen Charlton <gmc@esilibrary.com>
Tue, 28 Apr 2015 19:06:48 +0000 (19:06 +0000)
committerGalen Charlton <gmc@esilibrary.com>
Tue, 5 May 2015 16:34:19 +0000 (16:34 +0000)
commit3d2586ca0fe78f193bdd4263f6595108b1d8b814
treed01be8379b41ea307b92bc4cfbe21abdf735a674
parent3894361f94441b7d12fc19942f429e56ed43df39
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>
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