httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <>
Subject Re: On avoiding stat()
Date Thu, 18 Dec 1997 20:33:40 GMT
You need to stat() the file regardless.  How else do you determine if the
file in your cache is stale?  Even on non-IMS requests you need to stat(). 
Otherwise you have to implement full HTTP/1.1 proxy semantics, which is
non-trivial and not worth saving the stat() call imho. 


On Thu, 18 Dec 1997, Igor Tatarinov wrote:

> Hi all!
> As you might remember, I am trying to add a document cache to apache that
> would (hopefully) decrease the number of I/Os and save some CPU cycles by
> avoiding open/mmap/close
> So I got a question: is there any way to avoid the stat() call. I know that
> Apache needs to make it to mmap the file but if I already got the file in
> the cache and know its size, there is no reason to stat() the file. Of
> course, the file may have been updated but this happens not often and I
> could probably check for "If-Modified-Since" and stat the file only if
> reload was requested.
> any ideas?
> thanks,
> igor
> -- 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Igor Tatarinov, graduate student, Computer Science Dept, NDSU
> e-mail:   or
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View raw message