Luis Henrique Cassis Fagundes ([EMAIL PROTECTED]) said something to this effect:
>       Hi,
>       The module would handle the requests before any other modules and check
> in its database if there is a cached page for that request uri. If the
> page is cached, it will send the cached page and return DONE. If the
> page is not cached, it will let Apache handle the request normally, but
> it will cache the output in disk before sending it to the client.
>       This is simple and could be done with a proxy server instead of an
> Apache module, but the cache must be cleaned whenever the page is
> changed. I want to make this module and make an interface to clean the
> cache when the page is updated.
>       For example, you have a page that is generated from a database that is
> update by an administration program, and the page is updated every day,
> but re-generated every request. You just need to put some config lines
> in you httpd.conf to make my module cache the page, and add to the
> administration program some lines to remove the cache of the page X that
> have the parameter var=value in the QUERY STRING when it updates the
> database.
>       Do you think it can be done with existing modules or is it worth doing
> a new module?
>       Thanks.
>       []s
>       Luis

How are your files uploaded? If you use some sort of an automated system,
add a line to delete or rename or whatever the current version of the file,
so that when the URI gets called again, it is regenerated. Or, if you 
generate the output offline and push it up, then just remember (or have your
upload process) remake the cache.

I think you might be looking to make this more complicated than it needs to
be. Very little, in the way of disk-cache, is going to be faster than just
plain old static HTML. Put some logic into your cron entry that creates the
"cached" version that deletes the old one first.

(darren)

-- 
All pleasures cost at least the time they take.

Reply via email to