Re:Re: Puzzled at clientProcessRequest2 in squid-2.5.PRE6. :-(

From: <maer727@dont-contact.us>
Date: Thu, 18 Apr 2002 17:10:21 +0800 (CST)

Thanks, Henrik pal!

I think I should take some time to read FAQ and squid.conf
clearly. :-)

I still have a question, after reading FAQ and squid.conf,
and http_status in enum.h, I still puzzled at such statement.

     if (http->redirect.status) {
         /* force this to be a miss */
         http->entry = NULL;
         return LOG_TCP_MISS;

I do not understand the relationship between LOG_TCP_MISS and
the case that the variable "http->redirect.status" is not null.

IMHO, I think when http->redirect.status is not null, it indicates
a http redirect. Am I correct? But a http redirect is always cache
miss?

Best regards,
George, Ma

----- Original Message -----
From: Henrik Nordstrom
To: maer727@sohu.com
Cc: squid-dev@squid-cache.org
Subject: Re: Puzzled at clientProcessRequest2 in squid-2.5.PRE6. :-(
Sent: Thu Apr 18 15:34:18 CST 2002

> See
>
> offline_mode in squid.conf
>
> The Squid FAQ entry on redirectors, redirect_program in squid.conf and
> the other places in client_side.c using redirect.status.
>
> storeEntryValidToSend() in store.c
>
>
> Yes, LOG_TCP_HIT indicates a HIT, and LOG_TCP_MISS a miss.
>
> maer727@sohu.com wrote:
> >
> > Hi, pals!
> >
> > I am using squid-2.5.PRE6, In function clientProcessRequest2,
> > I am puzzled at the following statements,
> > if (Config.onoff.offline) {
> > debug(33, 3) ("clientProcessRequest2: offline HIT
");
> > http->entry = e;
> > return LOG_TCP_HIT;
> > }
> > if (http->redirect.status) {
> > /* force this to be a miss */
> > http->entry = NULL;
> > return LOG_TCP_MISS;
> > }
> > if (!storeEntryValidToSend(e)) {
> > debug(33, 3) ("clientProcessRequest2: !storeEntryValidToSend MISS
");
> > http->entry = NULL;
> > return LOG_TCP_MISS;
> > }
> >
> > What is the meaning and function of Config.onoff.offline, http->redirect.status and storeEntryValidToSend?
> >
> > I think LOG_TCP_HIT indicates a cache HIT and LOG_TCP_MISS indicates a cache MISS.
> > Am I correct?
> >
> > Best regards,
> > George, Ma
Received on Thu Apr 18 2002 - 03:36:42 MDT

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