httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject Re: On avoiding stat()
Date Fri, 19 Dec 1997 00:51:06 GMT
How are you indexing your cache?  By file or by URL?

There are things that you can easily break by skipping process_request.
For example:

BrowserMatch BadRobot/0.9 deny
<Directory />
    order allow,deny
    allow from all
    deny from env=deny
</Directory>

or,

BrowserMatch MSIE/4 downgrade-1.0

or any number of things that goes on in process_request().

That said, I know one particular new-httper who short-circuits responses
and avoids some of the phases.  Doing it is not a general purpose thing
though imho.

Dean

On Thu, 18 Dec 1997, Igor Tatarinov wrote:

> 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.
> 
> Hence:
> 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 :(
> 
> thanks,
> igor
> 
> 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
> > >
> > >
> 


Mime
View raw message