Re: How to do DTD in squid?

From: Yee Man Chan <ymc@dont-contact.us>
Date: Wed, 21 Aug 2002 07:09:35 -0700 (PDT)

--- Henrik Nordstrom <hno@marasystems.com> wrote:
> This would in principle be similar to the cache
> validations running today
> using If-Modified-Since queries I guess. See code
> thread involving
> clientHandleIMSReply.
>

It is not the same. IMS is still only one round trip.
In my case, there are two round trips. The reason why
there are two round trips is because before we send
out the HEAD, we don't know the Content-MD5 of a URL.
So it is not a revalidation.

Yee Man

> The logics for things like this (currently) belongs
> in client_side.c. There is
> no need to change http.c.
>
> Regards
> Henrik
>
>
> Yee Man Chan wrote:
> > Hi, folks,
> >
> > I am trying to implement DTD in squid. The idea
> of
> > DTD is to send a HEAD request before GET to ask
> for
> > the Content-MD5 of a URL in the case of a URL
> miss. If
> > the returned Content-MD5 matches anything in the
> disk
> > cache (my disk cache is indexed by Content-MD5
> values
> > instead of URLs), then it results in a cache hit.
> > Otherwise, it will have to run the GET request to
> > download the URL.
> >
> > Obviously, DTD disrupts squid's HTTP flow. So I
> am
> > stuck and don't know what to do... Here are my
> > questions:
> >
> > 1) Where should I make the Content-MD5 lookup
> after I
> > get a reply from my HEAD request?
> >
> > 2) The way I do DTD is to modify every METHOD_GET
> > request to METHOD_HEAD in clientProcessMiss. But
> then
> > when I am done downloading the HEAD reply, I am in
> > httpReadReply of http.c. storeClientCopy can't
> > run with clientCacheHit in http.c, so I can't
> handle
> > the case when there is a hit after I did a lookup
> in
> > my Content-MD5 table. How should I get around this
> > problem?
> >
> > I am hacking 2.4S7. You can find more information
> > about DTD by going to
> > http://devel.squid-cache.org/dtd/.
> >
> > Thanks in advance. Any help is appreciated.
> >
> > Regards,
> > Yee Man
> >
> >
> >
> >
> >
> >
> > __________________________________________________
> > Do You Yahoo!?
> > HotJobs - Search Thousands of New Jobs
> > http://www.hotjobs.com
>

__________________________________________________
Do You Yahoo!?
HotJobs - Search Thousands of New Jobs
http://www.hotjobs.com
Received on Wed Aug 21 2002 - 08:09:37 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:16:06 MST