Re: I have a question about the md5 hash.

From: Eliezer Croitoru <eliezer_at_ngtech.co.il>
Date: Thu, 13 Sep 2012 12:07:05 +0300

On 09/13/2012 10:07 AM, Henrik Nordström wrote:
>> We might need to make this the actual method string instead of internal
>> >code to preserve store keys across squid versions.
Well I was wondering about it myself.
and I wanted to ask a thing but still didnt finished investigating about it.
I have seen in debug ALL,3 some weird thing about the hash key and This
is the reason I asked about it.
I'm still not sure what I have seen so dont take yet anything as granted
from me about it yet.

I have tried to digest a url with a method to see if I can predict what
I will expect while watching the logs for a set of tests.

I saw squid does a double lookup for a HEAD and GET so 001(1) and 100
(4) and I got a string using a struct.

Request
uint8 :method
string :url = http://www1.ngtech.co.il/302.html
which resulted with a binary string with size of 34 bytes:
"\x01http://www1.ngtech.co.il/302.html"
the \x01 is hex octet for 1.

and I can predict it pretty nicely and smoothly for the "storeGet:key"
which is good since i can predict which key will be used to lookup the
store.

2012/09/13 11:37:01.875 kid1| storeGet: looking up
AE59C69F629FE4253FBCC7DCC4D924E1

but in the logs is see a lot:
2012/09/13 11:48:51.798 kid1| StoreEntry::checkCachable: NO: not cachable

but if you will check the url itself it's cachable as hell and allows
the cache to decide the freshness period.

as an example:
http://redbot.org/?uri=http%3A%2F%2Fwww1.ngtech.co.il%2F302.html
and it's a regular forward proxy so not a thing about validating the
host should cause this.
The browser sure cache it well and is not fetching using the proxy
unless I force it a refresh.

I'm still testing on where exactly we must use the store_url and not the
original_url.

I have two main point of url origin which are:
at StoreEntry::url ---->tranformed into---> StoreEntry::OriginalUrl
and at MemObject->url --->which tranformed into --> MemObject->original_url
(In a lot of places )
this is only canonical for now but it's in-line with other variables and
methods at these points.

I was thinking:
instead of using If else different statement how about using:
(store_url ? store_url : origianal_url, ......)
the disadvantage is the I cant put there a debugs... but I can throw it
inside the related method that will state the url.

Eliezer
Received on Thu Sep 13 2012 - 09:07:22 MDT

This archive was generated by hypermail 2.2.0 : Thu Sep 13 2012 - 12:00:06 MDT