> If you're willing to enter the wild-n-wooly world of object-oriented > mod_perl handlers you might consider trying Apache::CacheContent > (available on CPAN), which is based on Cookbook::CacheContent in the > mod_perl Developer's Cookbook.
Aha! Cheers for this. I've made /some/ progress, but it's still not quite
there...
> It dumps the request onto a file on disk based on the URL. If the
> file is removed then the content is regenerated. The module does not
> cache headers, instead it uses Apache's built-in file-serving code to
> serve up cached content written to disk.
That's not what I need though =) Currently what I want to cache is a CGI script
which uses a combination of PATH_INFO and sometimes QUERY_STRING.
So that the site looks like (for the most part) a static site, I use the
following trick in my httpd.conf:
Alias / /opt/mkd/cgi/mkdoc.cgi/
<Directory /opt/mkd/cgi>
# directives for mod_perl
PerlSetEnv PERL5LIB /opt/mkd
SetHandler perl-script
PerlHandler Apache::RegistryNG
PerlSendHeader On
# directives for CGI.
Options +ExecCGI
AddHandler cgi-script .cgi
order allow,deny
allow from all
AllowOverride none
</Directory>
So as you can see, I would need to cache the HEAD and GET methods going to the
mkdoc.cgi script, which is running under Apache::Registry.
Thanks to your pointers, I've managed to write a subclass of Apache::RegistryNG
which captures what would have been the output of Apache::RegistryNG and writes
it into '/tmp/foo'. (Attached file).
However, I cannot get this same module to actually send correctly the captured
output... Have you got any suggestions?
Thanks a bunch,
--
Building a better web - http://www.mkdoc.com/
---------------------------------------------
Jean-Michel Hiver
[EMAIL PROTECTED] - +44 (0)114 255 8097
Homepage: http://www.webmatrix.net/
Cache.pm
Description: Perl program
-- Reporting bugs: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html
