Re: [Httplib2-discuss] Non-opaque cache keys
Status: Beta
Brought to you by:
jcgregorio
From: Joe G. <jo...@bi...> - 2006-12-18 21:39:16
|
Just for the record, this bug has been fixed in trunk. http://sourceforge.net/tracker/index.php?func=detail&aid=1597306&group_id=161082&atid=818434 Thanks, -joe On 11/15/06, Sam Ruby <ru...@in...> wrote: > Joe Gregorio wrote: > > On 11/14/06, Sam Ruby <ru...@in...> wrote: > >> It looks like the current implementation takes the md5 of a somewhat > >> normalized URI and passes that as a key to the cache. > >> > >> For debug-ability and to increase the potential for integration with > >> other subsystems, I'd like to suggest that this be changed to pass > >> either the original URI unaltered or a normalized URI with the logic to > >> do the normalization refactored out into a separate function. > > > > This is a great idea, I was frankly jealous when I looked at the > > Venus cache and saw that it was filled with non-opaque named > > files. > > :-) > > >> Either way, the current FileCache could do the remaining > >> normalization/hashing of the key. Other storage systems could either > >> use the key as is, or could employ a different hash mechanism. > > > > That works for me, shouldn't take long to implement. > > The attached patch does not break any existing unit tests. This does > open up the question as to what normalization should be done. You are > welcome to any or all of the code and unit tests mentioned here: > > http://www.intertwingly.net/blog/2004/08/04/Urlnorm > > > Thanks, > > -joe > > - Sam Ruby > > > > -- Joe Gregorio http://bitworking.org |