Re: [squid-users] NO_CACHE

From: Amos Jeffries <squid3@dont-contact.us>
Date: Thu, 01 May 2008 21:27:52 +1200

Tiago Durante wrote:
> Hi!
>
> Well I don't think the ACLs name will make any difference... :)
>
> Let me explain what I want. I've this site, lets say "tiago.com", and
> I don't want squid to cache it. It isn't by my internal network that
> I'll know what's going to cache or not, but I'll know the external
> hosts that I shouldn't cache.
>
> So, what I need is tell my squid: "Dude, please don't cache
> 'tiago.com', ok!?" :)
>
> I'll show all the ways that I've tried...
>
> # 1
> acl dontcachemrsquid dstdomain tiago.com
> cache deny dontcachemrsquid
>
> # 2
> acl dontcachemrsquid dstdomain tiago.com
> no_cache deny dontcachemrsquid
>

#1 and #2 are identical to any squid that accepts both.

NOTE that is only will match pages at 'tiago.com' not www.tiago.com or
elsewhere.

> # 3
> acl dontcachemrsquid src 10.1.1.0/24
> cache deny dontcachemrsquid
>
> # 4
> acl dontcachemrsquid src 10.1.1.0/24
> no_cache deny dontcachemrsquid
>

#3 and #4 are identical to any squid that accepts both.

>
> But I don't know if it's working... Doesn't seems like at least,
> because the page, that is a horrible system made by some people here,
> can't work with cache and get all crazy and unformatted when reached
> by squid. :(

Okay, that sounds like a completely different problem!
Do you actually mean you want to get to the page without it going
through squid at all?
You can't configure squid to know that. By the time the request has been
made its already too late. You would need a PAC file or browser settings
instead.

All 'cache' option does is tell squid not to re-use the file if two
clients request the same one. Even if the website says its allowed to.

Um. Well, consider that if a standards-compliant software like squid
gets garbage when requesting the page properly. How can you guarantee
that the clients viewing it can see anything but garbage either?
Squid does not touch or affect the content of the pages going through it
unless you go to lengths to make it.

>
> What should I see at access.log? There is anybody using such a configuration?

Access log should show it being requested and where it was retrieved
from for use. Using 'cache' option you should only see TCP_MISS with
maybe the odd TCP_MEM_HIT if two requests were simultaneous.

Many people are using 'cache deny' to not cache things. Usually dynamic
pages since that was default for a long time.

Amos

-- 
Please use Squid 2.6.STABLE20 or 3.0.STABLE5
Received on Thu May 01 2008 - 09:27:20 MDT

This archive was generated by hypermail 2.2.0 : Tue May 13 2008 - 12:00:02 MDT