Re: can I remove cache feature from Squid or how can I make the time of cache is very short

From: JXu <forrestxu@dont-contact.us>
Date: Sun, 30 Sep 2007 18:22:15 -0700 (PDT)

Hi Amos and Henrik

Thank you for your reply.

I did the following tests:

             snprintf(buf, 128, "Cache-Control: no-cache;");
//also snprintf(buf, 128, "Cache-Control: no-cache max-age=1 no-store;");
//also snprintf(buf, 128, "Cache-Control: no-cache, max-age=1,
no-store;");
//also snprintf(buf, 128, "Cache-Control: no-cache; max-age=1;
no-store;");
              buf[127] = '\0';
              ci_request_add_xheader(req, buf);
 //with or without snprintf(buf, 128, "Expires: Thu, 01 Dec 1994 16:00:00
GMT;");
  //with or without buf[127] = '\0';
  //with or without ci_request_add_xheader(req, buf);

For all above options I selected my custom web page is still kept displaying
.
I must be wrong!

Any suggestion.

Thank you again!
Forrest

>Ah, it looks like you are slightly misunderstanding the BNF descriptions
>in the RFC. Only text bounded by "" is meant as exact. The rest is BNF
>syntax and 'variables'.

>So 'cache-request-directive' and 'cache-response-directive' are not meant
>to be actually in the header.

>That should be:
> "Cache-Control: no-cache;"

>probably "Cache-Control: no-cache max-age=1 no-store;" to cover all the
>bases.

Henrik Nordstrom-5 wrote:
>
> On mån, 2007-10-01 at 09:28 +1300, Amos Jeffries wrote:
>
>> Apparently "Expires: -1;" is invalid. Better to use an explicit
>> timestamp,
>> even if its Jan 1970, just to be sure that it works as expected.
>
> -1 is invalid, which by specifications means expired in the past. See
> RFC2616 14.21 Expires.
>
> But yes, it's better to use a correct date as the messages you send
> should comply with specifications, not just make the receiver do what
> you intended..
>
> Regards
> Henrik
>
>
>

-- 
View this message in context: http://www.nabble.com/can-I-remove-cache-feature-from-Squid-or-how-can-I-make-the-time-of-cache-is-very-short-tf4542212.html#a12972068
Sent from the Squid - Development mailing list archive at Nabble.com.
Received on Sun Sep 30 2007 - 19:22:16 MDT

This archive was generated by hypermail pre-2.1.9 : Mon Oct 01 2007 - 12:00:05 MDT