httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Igor Tatarinov <>
Subject Re: On avoiding stat()
Date Thu, 18 Dec 1997 22:37:01 GMT
No, I don't want to rewrite what has already been written. Here is what
I would like to do:

Main rule:
a file can only enter the cache once it's been thru all Apache normal 
processing stuff.

1) sometime before process_request() I check if the requested file is 
in my cache (I may have to check a lot of CGI-request names etc.)

2) if yes, and the request is not IMS
I send the file from cache assuming that is no big deal if it's a bit 
stale. I need to make sure process_request() is not called.

   if no, I call process_request().
if the request comes back to me I may want to cache it.

The reason why I want to avoid stat is that after stat(), open() is
much less of a problem (the directory block has been read).

Is what I said realistic?
The main problem is to avoid the process_request() call after I send 
the file from cache :(


Dean Gaudet wrote:
> I'd say you're on your own.  Nobody has done this that I know of, but it's
> supposed to be possible.
> I strongly urge you NOT to do this.  It will make your module useless for
> any distributed site.  Not to mention that you'll have to implement all
> the symlink checks, .htaccess files, and more stuff yourself.
> Dean
> On Thu, 18 Dec 1997, Igor Tatarinov wrote:
> > Sounds good. What do I do?
> >
> > Do I override translate_handler or post_read_request? I don't see how
> > I can avoid process_request_internal(). I don't want it to be called
> > on a cache hit.
> >
> > igor
> >
> >

View raw message