> Timothy Henigan wrote:
> At Wednesday, March 06, 2002 4:23 PM
> 
> 
> 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
> 

Slashdot caches templates under mod_perl in their system.  For an example,
download the latest version of slashcode (2.2.5) and take a look at the
/slash/Slash/Display/Provider/Provider.pm module.

http://sf.net/project/showfiles.php?group_id=4421&release_id=73958

Tim

Reply via email to