httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham Leggett <minf...@sharp.fm>
Subject Re: mod_proxy and buff.c
Date Wed, 22 Mar 2000 14:25:47 GMT
Dean Gaudet wrote:

> you could implement bseek without causing very much havoc in the rest of
> buff.c.

I've looked inside buff.c - there is much talk about "this will be
changed in v2.0", so I'm not that keen to fiddle with it.

> do like zip does -- store a little directory at the end of the file.
> 
> append the headers to the response, and then append a small structure:
> 
> struct foo {
>         off_t start_of_headers;
>         unsigned long magic;
> };
> 
> where magic is set to some special value indicating this is an apache
> httpd cache file, and start_of_headers is something you get from a btell()
> before writing the headers.  oh, you'll have to implement btell() :)
> 
> or you could just use read/write/lseek.  probably easier.

I tried read/write/seek, but the buffer code read too much data (being
buffer code after all), and in the process messed up my attempts to
lseek.

What I've looked at doing is to just recreate the cache file from
scratch. This recreation will only happen when objects are revalidated,
and only if the updated headers change, so there will be minimal
performance implications. The code already exists to do 90% of the work
- instead of writing the new temp file from incoming server data, we
rewrite it from the old cache data. This will be a temporary solution
until I get a shared memory cache properly implemented, which will
probably be v2.0 only.

Regards,
Graham
--

Mime
View raw message