[PHPTAL] Cache options from PHP
Kornel Lesinski
kornel at aardvarkmedia.co.uk
Mon Apr 7 16:34:23 CEST 2008
On 7 Apr 2008, at 12:11, B. Kamer wrote:
> Would it be possible to set caching options not from within the
> template but rather from PHP? I need to be able to do this because
> the engine that utilizes the template engine decides the caching
> options?
I've added such possiblity — check latest SVN revision (r340).
phptal:cache now allows variable name in place of number, so the
following will cache for 3 hours:
$phptal->set('cache_duration', 3); // variable's value must be integer
...
<div phptal:cache="cache_duration h"> <!-- you must put unit in the
attribute after variable's name -->
--
regards, Kornel
More information about the PHPTAL
mailing list