On Tue, 7 Nov 2000, Marinos J. Yannikos wrote:
> > If you have a caching proxy server running in front of your mod_perl
> > server (like mod_proxy or Squid), you can just set Expires headers in your
> > pages and this will be handled for you by the proxy.
>
> True, both methods have advantages and disadvantages. The advantages of
> using mod_rewrite and static pages are:
> - less configuration / maintainance overhead
Only if you don't already have a proxy front-end. Most large sites will
need one anyway.
> - no extra care needed with headers
You don't have to add Expires headers, but you do have to add a section to
each script that captures the output and puts it in a static file.
> - static pages can be removed at any time and kept around as long as needed,
> individual static pages can be removed and regenerated
We took the URL->filename hashing from mod_proxy and used it to make a
little program that can delete a URL from the cache on command. This is
not a standard part of the distribution though.
> The obvious disadvantage is that it may be tricky to find / maintain an
> URL/file encoding scheme that can handle all the possible arguments for
> dynamic pages.
If you're doing this on a mod_perl server already, it might actually be
easier to write a TransHandler for it, and use an MD5 hash or something to
generate the file names. Matt Sargent does this sort of thing in AxKit,
so that might be a place to steal code from.
- Perrin