On Sun, 30 Apr 2006 22:38:23 +0200
Graham Leggett <[EMAIL PROTECTED]> wrote:

> 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.

If both the data and header have the same expiration time they should
both be removed atomically, but this would be hard to achieve. The trick
is to set the header to expire before the data. Also, this would confuse
the cache user not the cache itself.

> > 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).
> 

mod_cache needs only to cache key/value pairs. The key/value format is up to
the mod_cache user.

--
Davi Arnaut

Reply via email to