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 Sun, 30 Apr 2006 20:38:23 GMT
Brian Akins wrote:

> mod_http_cache could just cache headers and data as separate cache entries.

The potential danger with this is for race conditions to happen while 
expiring cache entries. If the data entity expired before the header 
entity, it potentially could confuse the cache - is the entry cached or 
not? The headers say yes, data says no.

> So a given HTTP "object" may actually have 3 entries in the cache:
> -first entry says: Vary on x,y,z
> -second entry is headers for new key (generated with the vary info)
> -third entry is the actual data

Each variant should be an independent cached entry, the cache should 
allow different variants to be cached side by side.

> As far as mod_cache is concerned these are 3 independent entries, but 
> mod_http_cache knows how to "stitch" them together.
> mod_cache should *not* be HTTP specific in any way.

mod_cache need not be HTTP specific, it only needs the ability to cache 
multiple entities (data, headers) under the same key, and be able to 
replace zero or more entities independently of the other entities (think 
updating headers without updating content).

In other words, there must be the ability to cache by a key and a subkey.


View raw message