Rasoul Hajikhani wrote:
>
> Robert Landrum wrote:
> >
> > At 12:28 PM -0800 3/6/02, Rasoul Hajikhani wrote:
> > >Hello People,
> > >Need your advise on how to cache a template under
> mod_perl... Any ideas?
> > >Thanks in advance
> > >-r
> >
> > #startup.pl
> >
> > open(FILE,"</path/to/tmpl");
> > $MY::TEMPLATE .= while(<FILE>);
> > close(FILE);
> >
> > Provided that you never change $MY::TEMPLATE, this should work fine.
> >
> > --
> > When I used a Mac, they laughed because I had no command
> prompt. When
> > I used Linux, they laughed because I had no GUI.
> Thanks... But I use Template Toolkit to generate a dynamic file. How
> would the above code work in that situation?!
> -r
>
The Template Toolkit package includes it's own caching mechanism. Check out
the pod for Template::Provider on your system. I'm not sure how it works
under mod_perl, but it should be a good place for you to start.
Tim