I wanted to develop a caching proxy that will return a cached page instead of passing control to one of the PHP scripts or Perl scripts that normally generate the pages.
This is called a "reverse proxy" and is very common in mod_perl setups. It is typically done with the mod_proxy module and mod_rewrite.
See this for more details: http://perl.apache.org/docs/1.0/guide/strategy.html#Adding_a_Proxy_Server_in_http_Accelerator_Mode
One extra requirement is that some of the pages need authentication which is cookie based. I would need to check the cookie against a database to see if the caller is authenticated to access the particular page. Has anyone done/seen anything similar implemented in mod_perl?
That's very easy to do in mod_perl, but you generally do not want to run mod_perl on the proxy server. The idea is to keep the proxy server really small and light. There are various auth modules for apache written in C which you might be able to use. If none of those suit your needs and you don't want to write a C module, you certainly can put mod_perl on the proxy and write what you want in Perl. The only drawback to this is the additional memory that will be needed for that server.
- Perrin