httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joe Orton <>
Subject Re: mod_cache and its ilk
Date Mon, 30 Oct 2006 18:00:30 GMT
On Mon, Oct 30, 2006 at 10:26:18AM -0700, Justin Erenkrantz wrote:
> On 10/30/06, Joe Orton <> wrote:
> >1) cannot write entire response to disk for any content type before
> >sending anything to the client; filter acts by writing to cache and
> >client synchronously
> My concern with this is we should be careful not to teach the
> providers about the fact that it is sitting in an output filter chain.

This is solvable if desired, but I'd like to address it separately to 
keep this thread under control.

> >2) avoids writing a given URL/variant to the cache more than once
> >simultaneously using open/O_EXCL
> There's problems with relying upon O_EXCL.  mod_disk_cache
> purposefully lets the race condition happen as without inter-process
> sync, it's not really easy to know who is actually around and is
> likely to finish.

Are you talking issues with O_EXCL not being reliable on e.g. NFS, or 
just about the fact that the partial file left by a dead/hung process 
subsequently prevents any chance to write to that cache file?

This is a tricky trade-off; I can go either way.  I would say it would 
be OK to rely on htcacheclean having heuristics to expire (prematurely 
if necessary) such partial files.

> 4) No penalties are applied to the client when we do not have a
> complete cached entity on hand.


> 5) If writing to the cache fails, the client doesn't need to know
> that, but the admin should get a nice note somewhere.



View raw message