httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Igor Tatarinov <tatar...@prairie.NoDak.edu>
Subject Re: On avoiding stat()
Date Thu, 18 Dec 1997 20:42:17 GMT
If the author of the page requests it, it will be reloaded and I should 
be able to detect it. If somebody else requests a stale page, it can 
send a stale copy (this assumes I do stat the file every once in a while, 
say every 30 min).

In fact, this means that I will never have  a stale copy if the author 
takes a look at the final version of his/her masterpiece. And this is
typically the case, I'd guess.

am I missing something?
igor

Dean Gaudet wrote:
> 
> 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.
> 
> Dean
> 
> 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: tatarino@prairie.nodak.edu   or   itat@acm.org
> > http://www.cs.ndsu.nodak.edu/~tatarino
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Igor Tatarinov, graduate student, Computer Science Dept, NDSU
e-mail: tatarino@prairie.nodak.edu   or   itat@acm.org
http://www.cs.ndsu.nodak.edu/~tatarino
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Mime
View raw message