RE: Squid DNS caching behaviour

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Fri, 9 Jul 2004 18:16:25 +0200 (CEST)

On Fri, 9 Jul 2004, Andrew Carroll wrote:

> If I were to modify storeKeyPublic to MD5 hash on the original
> destination address as well as url, method, how many dependencies would
> this affect?

Not very many.

ICP obviously will be of limited use so you don't really need to care
about that part.

> From what I've gathered, it looks like I'll need to add the original
> destination address to the request_t structure as well.

This is probably the easiest approach yes.

> Are there many functions that directly depend on storeKeyPublic and
> storeKeyPublicByRequest?

A grep in squid-2.5 shows:

storeKeyPublic:

icp_v2.c: return storeKeyPublic(url, METHOD_GET);

store.c: return storeGet(storeKeyPublic(uri, method));
store.c: newkey = storeKeyPublic(mem->url, mem->method);
store.c: newkey = storeKeyPublic(mem->url, mem->method);

storeKeyPublicByRequest:

neighbors.c: const cache_key *key = request ? storeKeyPublicByRequest(request) : NULL;
neighbors.c: key = storeKeyPublicByRequest(request);

peer_digest.c: key = storeKeyPublicByRequest(req);

store.c: return storeGet(storeKeyPublicByRequestMethod(req, method));
store.c: newkey = storeKeyPublicByRequest(mem->request);
store.c: newkey = storeKeyPublicByRequest(mem->request);

All the storeKeyPublic calls in store.c most likely should be replaced by
storeKeyPublicByRequest or storeKeyPublicByRequestMethod.

The call in icp is not relevant to transparently intercepting proxies not
using DNS and can be ignored for this discussion.

Regards
Henrik
Received on Fri Jul 09 2004 - 10:16:31 MDT

This archive was generated by hypermail pre-2.1.9 : Sat Jul 31 2004 - 12:00:03 MDT