Template Caching

18 views
Skip to first unread message

Greg Fuller

unread,
Sep 2, 2009, 12:33:46 AM9/2/09
to H2o template PHP
Is template caching working ? I've tried taking the default, which I
understand is "true", as well as specifying explicitly 'cache'=>true.

But I can see no evidence of a temporary cache file. Or maybe I'm
just missing something....

Taylor Luk

unread,
Sep 2, 2009, 12:21:54 PM9/2/09
to h2o-temp...@googlegroups.com
Hello Greg,

Template Cache is turned on by default, It caches the object representation of the template into a file. It defaults to what every your tmp path of your operating system has. (/tmp, /var/tmp, c:\users and settings\username\temp).

if you want to set the cache path, here is the config option to do it.

new h2o('index.html', array(
   'cache' =>  'file',  // options: 'file', 'apc', false (default "file")
   'cache_dir' => dirname(__FILE__)
));

Cheers

Greg Fuller

unread,
Sep 2, 2009, 1:34:30 PM9/2/09
to H2o template PHP
Thanks. And.... I really like what I'm seeing in h2o. I appreciate
all your work on this.

On Sep 2, 11:21 am, Taylor Luk <subject...@gmail.com> wrote:
> Hello Greg,
>
> Template Cache is turned on by default, It caches the object representation
> of the template into a file. It defaults to what every your tmp path of your
> operating system has. (/tmp, /var/tmp, c:\users and settings\username\temp).
>
> if you want to set the cache path, here is the config option to do it.
>
> new h2o('index.html', array(
>    'cache' =>  'file',  // options: 'file', 'apc', false (default "file")
>    'cache_dir' => dirname(__FILE__)
> ));
>
> Cheers
>
Reply all
Reply to author
Forward
0 new messages