Josh,
On Feb 8, 2008, at 5:18 PM, Dirk-Willem van Gulik wrote:
On Feb 6, 2008, at 10:26 PM, josh rotenberg wrote:
grr, this cold is making me dumber than usual. the link:
http://code.google.com/p/modmemcachecache/
Shame I did not discover your code before !
Mine(1) looks fairly very similar - Except I sort of started with
apr_brigade_pflatten() as well - but then removed it to see if that
would let me cut off things which are too large earlier - and then
got into the mess of re-allocing and what not. But that was propably
the wrong path. Let me see if I can merge things a bit.
Ok - more or less merged a lot between both modules (2) --- al the
good bits are yours :) Does that make sense to you ?
Issues I am particularly torn over are:
- change from re-alloc to brigades -- but this means we have 100-500k
chunks sitting in memory 2x or 3x
---> ultimately perhaps apr_memcache needs to understands the
brigades perhaps.
- passing of the info glob -- I guess we should make it perhaps number
\0number\0 or something for convenience and speed ?
- I am making MD5 keys -- you are trusting the URI. What is best
really ?
- create/open -- we could fetch it all already then.
- Or defer to the actual header/body routines - as you and I do now.
- Or just 'punt' and store the thing as one big wack - as generally
you are
propably going to need both ?
- Or should we get more clever and make the "Key" not just the URI but
everything
under VARY -- but if we do that -- we should really do that for
mod_cache so
that all modules would benefit - i.e. mod_disk_cache.
What are your thoughts ?
Dw
1: http://www.webweaving.org/tmp/mod_memcached-hack.c
2 ttp://www.webweaving.org/tmp/mod_memcached-hack-2.c