httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Graham Leggett" <>
Subject Re: Possible new cache architecture
Date Tue, 02 May 2006 15:22:00 GMT
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.

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.

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

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

- mod_cache hands the cached data back to the browser.

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


View raw message