Right now (only) mod_disk_cache is doing the 'right(tm)' thing w.r.t.
to Vary - the other caches (mod_memcache as part of the distribution
and a handful of memcached, distcache and commercial cache modules)
are just acting on the URI (key).
Bringing them in line involves a bit of cut-and-paste from disk-cache.
So I am wondering if I should do the following -- but want to have
some feedback of the folks who have been spending the last years on
this -- as I may have missed something fundamental:
- Move sundry like array_alphasort, tokens_to_array up into
cache_utils or similar.
- Perhaps add a extra function vector called 'make_key' -- which can
be NULL to the
cache_provider; which understands most of rfc2616; including case
(insensitivity). In
short - we'll propably end up with a struct which details the
relevant headers, if
they are int, date, case-insensitive or sensitive. Which allows us
then to always
do the right thing.
- When we call store_* already pre-fillout cache_info (or add a param)
which does the
right things around checking for Vary. And perhaps even a precooked
version of
headers_out/in.
Before I embark on an experiment (without much design/planning) -- any
thoughts ? Or has someone already done most of this and/or designed it
properly ?
Thanks,
Dw