httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Davi Arnaut <>
Subject Re: Possible new cache architecture
Date Tue, 02 May 2006 18:35:43 GMT
On Tue, 2 May 2006 17:22:00 +0200 (SAST)
"Graham Leggett" <> wrote:

> On Tue, May 2, 2006 7:06 pm, Davi Arnaut said:
> > There is not such scenario. I will simulate a request using the disk_cache
> > format:
> The way HTTP caching works is a lot more complex than in your example, you
> haven't taken into account conditional HTTP requests.

I've taken into account the actual mod_disk_cache code! Let me try to translate
your typical scenario.

> A typical conditional scenario goes like this:
> - Browser asks for URL from httpd.


> - Mod_cache has a cached copy by looking up the headers BUT - it's stale.
> mod_cache converts the browser's original request to a conditional request
> by adding the header If-None-Match.

sed s/mod_cache/mod_http_cache

> - The backend server answers "no worries, what you have is still fresh" by
> sending a "304 Not Modified".

sed s/mod_cache/mod_http_cache

> - mod_cache takes the headers from the 304, and replaces the headers on
> the cached entry, in the process making the entry "fresh" again.

sed s/mod_cache/mod_http_cache

> - mod_cache hands the cached data back to the browser.

sed s/mod_cache/mod_http_cache

> Read section 13 (mainly) to see in
> detail how this works.

Again: we do not want to change the semantics, we only want to separate
the HTTP specific part from the storage specific part. The HTTP specific
parts of mod_disk_cache, mod_mem_cache and mod_cache are moved to a
mod_http_cache, while retaining the storage specific parts. And mod_cache
is the one who will combine those two layers.

Again: it's the same thing as we were replacing all mod_disk_cache file
operations by hash table operations.

Davi Arnaut

View raw message