Re: Document Caching

2002-03-06 Thread Adekunle Olonoh


  Need your advise on how to cache a template under mod_perl... Any ideas?
  Thanks in advance
  
 Thanks... But I use Template Toolkit to generate a dynamic file. How
 would the above code work in that situation?!

You should probably post this to the Template Toolkit mailing list for
more info but TT has built-in support for caching templates to disk.

TT mailing list: http://www.template-toolkit.org/info.html#lists
TT caching:
http://www.template-toolkit.org/docs/plain/Manual/Config.html#Caching_and_Compiling_Options


--Ade.


_
Do You Yahoo!?
Get your free yahoo.com address at http://mail.yahoo.com




Re: Directory Restrictions

2001-06-27 Thread Adekunle Olonoh


  I found it, quite be accident in the Eagle Book
 
  Lost the page number, but it was in Chapter 4.

There's some discussion in the last paragraph of page 86.


  anybody got a more specific pointer to help us fuzzy searchers
  find 'how to have mod_perl handle directory requests'?

Hopefully this should be a pretty decent start:

-

package My::DirList;

use strict;
use Apache;
use Apache::Constants qw(:common);

sub handler {
 my $r = shift;

 if ($r-content_type eq 'httpd/unix-directory') {

 # Do whatever you need to do right here

 return OK;
 }
 else {
 return DECLINED;
 }
}


1;

-- 

___

  Ade Olonoh, BOTTLED SOFTWARE

  317.576.1120 x12 (phone) 317.576.1135 (fax)
___