Barry,

I have never used it (nor do I have any details to share), but have you looked at:

http://httpd.apache.org/docs-2.0/mod/mod_cache.html

Sean

On Mar 21, 2005, at 10:48 PM, Cees Hek wrote:

On Mon, 21 Mar 2005 19:36:38 -0500, Barry Hoggard
<[EMAIL PROTECTED]> wrote:
I'm working on a site that does a lot of mysql hits, and I want to
cache pages for an hour. Here is a quick summary of how I'm doing it,
in a base class for all CGI::Application modules. I will add some kind
of package or method regex when I get to the pages that I don't want
cached. Is this the best approach, or is there a better way? This
might run on a shared host as CGIs for now, so I'm concerned about
performance, but I'm trying to keep things relatively simple.

The code you provide looks like it should work. There are a few other options that you could research:

- The Cache::Cache modules are known to be slow - might be worthwhile
to checkout Cache::MMap which I understand is much faster

- You could forgo the caching scheme and generate static pages every
hour.  This would be much more efficient (unless you have thousands of
possible cached items that may not be called very often).

- Ideally, you should let a reverse proxy do the caching for you by
setting up Squid or Apache/mod_proxy in front of your webserver, and
then set Expires headers for all your pages.  This might not be
possible, since you mention you are on a shared server...  (you should
probably set the Expires headers anyway, since it will help on page
reloads).

Cheers,

Cees

---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[email protected]/
              http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[email protected]/
             http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to