Re:Re:Re: My opinions on nocache and nocache_hack. :-)

From: Henrik Nordstrom <hno@dont-contact.us>
Date: Sun, 28 Apr 2002 17:02:44 +0200

Both indicates the same thing: The request indicates we should/must
bypass the cache.

The use of the nocache_hack flag allows certain squid.conf directives
to override this requested criteria. We select which of the two flags
to set early on in the request path to simplify the decisions later
on.

Regards
Henrik

On Sunday 28 April 2002 16:47, maer727@sohu.com wrote:
> Thanks, Henrik pal!
>
> I take some time to look at the related mail and source files.
> Here is the email you post me before,
>
> no_cache == when the HTTP request indicates we should/must bypass
> the cache.
>
> nocache_hack == when squid.conf is configured to circument the
> no_cache HTTP criteria..
>
> since nocache_hack is to circumvent the no_cache criteria, and
> no_cache criteria is to ask the cache to bypass the cache. Then I
> think you mean no_cache means even though no_cache flag is
> assigned, if nocache_hack is assigned at the same time, then we
> should violate the no_cache criteria. So, we should ask the object
> to be cached in proxy in this case. Am I correct?
>
> But why you say the following?
>
> No, they are not the same. Both indicates the user has
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~
> requested the object must not be from the cache, but in case
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> of nocache_hack there is squid.conf rules which may override
> the request.
>
> no_cache means "the user has requested the object must not
> be from the cache". And nocache_hack means circument the
> no_cache criteria, as you mentioned. They should on the
> contrary, IMHO. Why you say they both indicate the same thing?
>
> Best regards,
> George Ma
>
>
> ----- Original Message -----
> From: Henrik Nordstrom
> To: maer727@sohu.com
> Cc: squid-dev@squid-cache.org
> Subject: Re:Re: My opinions on nocache and nocache_hack. :-)
> Sent: Sun Apr 28 20:09:44 CST 2002
>
> > The major use of nocache_hack is in refresh.c. There it makes a
> > significant difference.
> >
> > On Sunday 28 April 2002 11:39, maer727@sohu.com wrote:
> > > Thanks, Henrik pal!
> > >
> > > I have read the codes,
> > > if (no_cache) {
> > > #if HTTP_VIOLATIONS
> > > if (Config.onoff.reload_into_ims)
> > > request->flags.nocache_hack = 1;
> > > else if (refresh_nocache_hack)
> > > request->flags.nocache_hack = 1;
> > > else
> > > #endif
> > > request->flags.nocache = 1;
> > > }
> > >
> > > I think it means that in this case nocache and nocache_hack are
> > > not the same. For example, in this case, nocache==true but
> > > Config.onoff.reload_into_ims==false, nocache and nocache_hack
> > > are not the same. Am I correct?
> > >
> > > In the pase time, I only notice the following two cases, so in
> > > my mind they are the same all the time. :-) Now I think I have
> > > known in some cases they are not always the same.
> > >
> > >
> > > if (r->flags.nocache)
> > > ipcacheInvalidate(r->host);
> > > #if HTTP_VIOLATIONS
> > > else if (r->flags.nocache_hack)
> > > ipcacheInvalidate(r->host);
> > > ......
> > > if (r->flags.nocache || r->flags.nocache_hack) {
> > >
> > > Best regards,
> > > George Ma
> > >
> > > ----- Original Message -----
> > > From: Henrik Nordstrom
> > > To: maer727@sohu.com
> > > Cc: squid-dev@squid-cache.org
> > > Subject: Re: My opinions on nocache and nocache_hack. :-)
> > > Sent: Sun Apr 28 16:43:13 CST 2002
> > >
> > > > http://www.squid-cache.org/mail-archive/squid-dev/200204/0707
> > > >.htm l
> > > >
> > > > On Sunday 28 April 2002 05:36, maer727@sohu.com wrote:
> > > > > Thanks, Henrik pal!
> > > > >
> > > > > I search "no_cache" in squid.conf and do not find any
> > > > > rules. What are the rules you mentioned?
> > > > >
> > > > > Another question, what means "may override the request"? Do
> > > > > you mean in some cases even though the request asks the
> > > > > cache to remove the object from cache, the object will
> > > > > still be kept in cache without removing(so, it is on the
> > > > > contrary of the request)?
> > > > >
> > > > > Best regards,
> > > > > George Ma
> > > > >
> > > > > ----- Original Message -----
> > > > > From: Henrik Nordstrom
> > > > > To: maer727@sohu.com
> > > > > Cc: squid-dev@squid-cache.org
> > > > > Subject: Re:Re: My opinions on nocache and nocache_hack.
> > > > > :-) Sent: Sat Apr 27 22:00:36 CST 2002
> > > > >
> > > > > > No, they are not the same. Both indicates the user has
> > > > > > requested the object must not be from the cache, but in
> > > > > > case of nocache_hack there is squid.conf rules which may
> > > > > > override the request.
> > > > > >
> > > > > > On Saturday 27 April 2002 14:20, maer727@sohu.com wrote:
> > > > > > > Thanks, Henrik pal!
> > > > > > >
> > > > > > > I think nocache_hack means the cache should not cache
> > > > > > > the object. I mean the meaning of no_cache and
> > > > > > > nocache_hack are the same.
> > > > > > >
> > > > > > > Am I correct?
> > > > > > >
> > > > > > > Best regards,
> > > > > > > George Ma
> > > > > > >
> > > > > > > ----- Original Message -----
> > > > > > > From: Henrik Nordstrom
> > > > > > > To: maer727@sohu.com
> > > > > > > Cc: squid-dev@squid-cache.org
> > > > > > > Subject: Re: My opinions on nocache and nocache_hack.
> > > > > > > :-) Sent: Sat Apr 27 15:43:25 CST 2002
> > > > > > >
> > > > > > > > maer727@sohu.com wrote:
> > > > > > > > > Hi, pals!
> > > > > > > > >
> > > > > > > > > After reading severals of source codes, I think
> > > > > > > > > nocache_hack is the same as nocache if
> > > > > > > > > HTTP_VIOLATIONS is defined. I have met with
> > > > > > > > > serveral cases where we
>
> ......
Received on Mon Apr 29 2002 - 00:48:49 MDT

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